Probleme mit der perfekten Lichtsteuerung mit Fibaro LUA – Teil 1

Hallo und guten Tag Chris,

ich habe mir deine Scene mal auf meine Fibaro HC2 geladen und die Werte für Sensoren und meinem Dimmer geändert.
Im Debug wird auch angezeigt das der Dimmer einschaltet. Leider macht er es nicht wirklich. Könntest Du dir mal meine Scene ansehen?
Ich bin mit meinem Wissen noch am Anfang und finde den Fehler nicht.
Wenn ich die Scene in der Grafischen einstelle Geht das verfluchte Licht an und zwar genau mit den gleichen ID für die Sensoren und Dimmer

Mit freundlichen Grüßen

René
–[[
%% properties
56 value
58 value
%% globals
TimeOfDay
PresentState
–]]

–[[ Change – XXX value – above. One for motion sensor, one for Light sensor.
TimeOfDay global variable and lux make sure that the scene
will be triggered when you are already in the room and something changes.

Set your settings below, lights and add extra functions
This code is developed by Control Living. You can use this free of charge.
Feel free to suggest changes or contact when having problems.
Version 1.6.4
–]]

——————————————————————–
———————–YOUR LIGHT SETTINGS————————–

motionSensorID = {56}; — change id for your motion sensor.
LuxSensorID = {58}; — change id for your light sensor.

–Enter the name of your Global variable. WITHOUT IT, THE SCENE DOES NOT WORK. Capital sensitive!
sleepState = “SleepState”; –Sleep globalstate variable.
timeOfDay = “TimeOfDay”; –Time of Day Global variable.
presentState = “PresentState”; –Present state Global variable.

–Enter the values of your global variables stated above. If not using, copy the name in front of the “YourValueName”
sleepStateMapping = {Sleeping=”Sleeping”, Awake=”Awake”};
timeOfDayMapping = {Morning=”Morning”, Day=”Day”, Evening=”Evening”, Night=”Night”};
presentStateMapping = {Home=”Home”, Away=”Away”, Holiday=”Holiday”};

— Set the lux value for which the lights have to be turned on.
— If you don’t want to use the MinLux then just set it to: 65535
minLuxMorning = 100;
minLuxDay = 300;
minLuxEvening = 5540;
minLuxNight = 30;

–[[
Now the most important part:
Here you can enter what light, for how long and at what value has to be turned on.
Leave empty brackets for no lights.
To set the light value without timer use 2 parameters: {LightID, “VALUE”}
To set the light value with timer use 3 parameters: {LightID, “VALUE”, timeInSeconds }
To set the light value with the
automatic lights virtual device. use 4 parameters: {LightID, “VALUE”, “timeInSeconds”, VirtualDeviceSliderID} –]]

lightsSleeping = {}; –lights that are triggered when Sleepstate is sleeping.
lightsMorning = {{id=62, setValue=”turnOn”, onTime=300}};
lightsDay = {{id=62, setValue=”80″, onTime=90}};
lightsEvening = {{id=62, setValue=”turnOn”, onTime=30}};
lightsNight = {{id=62, setValue=”45″, onTime=20}};
–setValue={R=”255″,G=”255″,B=”255″,W=”255″}
–Manual Override, the time that lights will not be turned ON again after manually turning them off.
OverrideFor = 90;
dimmDownTime = 10;