Aller au contenu

speedoxx007

Membres confirmés
  • Compteur de contenus

    276
  • Inscription

  • Dernière visite

  • Jours gagnés

    1

Messages posté(e)s par speedoxx007

  1. Version 4.113 Beta

     

    This update features migration process from version 3.600, reconfiguring every device, adjusting them for changes which took place in the system. This will assure a possibly smooth transition and continuous operation, allowing each device to work with old settings until reconfiguration is done. Please, refer to the message that appears in the interface and Notification Center for further instructions after finishing upgrade.

     

    Important!

    Updating from version 3.600 may take up to 30 minutes. Do not restart controller during update process.

     

    Resolved issues:

    - Firmware Update section is hidden from the devices configuration,

    - Weather plugins force the data refresh.

     

    Version 4.112 Beta

     

    Resolved issues:

    - Incorrect redirect after an update.

    - It is not possible to create scene with weather or weather plugins as a condition.

    - Information about the status change of some devices (e.g. Wall Plug) are not displayed in the event panel.

    - Devices with unticked "Show measurement of energy consumption" option are counted in the global power measurement.

    - You cannot edit the location points in the location panel.

    - No possibility of a simultaneous change in many blockade parameters of KeyFob.

    - Central Scene Events are sent twice.

    - Sending an unsupported action to a device can cause a crash of the Z-Wave service.

     

    New devices support:

    - Eurotronics Comet Z.

    - Eurotronics Stella Z.

    - Philio Technology Corp Multisensor PST02.

    - Philio Technology Corp PAN06.

    - Domitech LLC Smart LED Retrofit Kit ZE27EU.

     

    Other improvements:

    - The view of system update is now similar to configuration Wizard.

     

    Version 4.111 Beta

     

    Resolved issues:

    - Heating and cooling panels don't work with FGWP102 as an actor.

    - Problem with LUA code execution in virtual devices.

    - Lack of wind unit in API.

    - Z-Wave network reset doesn't delete device notifications.

    - Mobile devices containing Polish special characters in names are wrongly displayed.

    - Update hangs up.

    - Scale for power consumption is not displayed for RGBW.

    - Dashboard always displays sunday.

    - #0002626 deselecting notification of a low battery.

    - Weather can't be used as a condition in block scenes.

    - #0004014 Manual and holiday time rounds temperature sent to devices.

    - Unification of time display in the web interface.

    - Minor graphic fixes.

        

    Other improvements:

    - Fibaro Keyfob - the ability to use key sequences for executing the action in system. The ability to block device with key and unblock it with key sequence.

    - Magic scenes for devices which use Scene Controller or Scene Activation - the ability to add scenes in the configuration of device supporting Central Scene or Scene Activation. Devices already existing in Home Center require soft reconfiguration, after reconfiguration you will have new configuration options.

    - Remote support on demand - feature is default off, in LAN settings tab you can grant possibility to enable remote connection for Fibaro Support.

    - Functionality of temperature measurments export (CSV file) in temperature panel.

     

     

    CHANGES INTRODUCED IN VERSION 4.X:

     

    - Drag & Drop for devices and scenes - available on home, devices and rooms screens. Assigning devices to rooms and changing its order is now much easier and faster.

    - Temperature Panel - allows to see history of temperature changes in rooms and on each device.

    - Diagnostic Panel - general information about HC working condition like CPU & RAM usage, free space on hard drive. Will be extended in future versions.

    - Soft Device Reconfiguration - option allows to save settings, parameters and device ID. Thanks to that scenes with reconfigurable device will not require editing. Full reconfiguration will remove and add the device to the Z-Wave network, resulting in the loss of its settings, parameters and change the device ID..

    - Mesh Network Reconfiguration - available on Configuration -> Z-Wave Network

    - New Z-Wave engine - redesigned and rewritten from the scratch. Now is faster and has better support for devices.

    - Z-Wave Door Locks support - controlling and PIN settings.

    - Thermostats - extended controlling for thermostats from manufacturers like: Honeywell, Trane Corporation.

    - Extended tamper for sensors - exclusive information for motion detection and violation of sensors.

    - Fibaro Smoke Sensor extended support - level of smoke and gap to alarm level is reported and visible on charts. Sensitivity level is now easier to set.

    - Fibro Motion Sensor new device - when seismometer mode is turned on new device reporting tremors is available. Charts for temperature and illuminance. Additionally information about sensor violation.

    - Device hiding - device that is not in use can be hide without removing it.

    - Device deactivation - deactivated device is visible in UI but can't be controlled.

    - Multithreading added for HC (server and z-wave) - now engines work much faster.

    - Event panel moved - for better usability now is available in menu on right side of screen.

    - Pre-Update Confirmation - installing update will prompt user additional confirmation.

    - Added support for American English (EN-US)

    - User rights management - moved to Configuration.

    - Recovery Memory Health - can be checked on Backup & Recovery

    - Backups has information about compatibility with current HC version

    - Block scenes improvements - for device only available actions are visible, scene activation block added and logical conditions grouping using brackets.

    - Lua Scenes - updated tool-tips for devices.

    - Rest API Active Documentation - documentation and ability to test REST API requests, access at HOME_CENTER_IP/docs

     

    Plugins:

     

    - Plugins are grouped in categories: Safety, Cameras, Climate, Multimedia, Others

    - Plugins search

    - Network devices search via ARP

     

    Plugins category Safety:

    - Modular Alarm

     

    Plugins category Cameras:

    - more than 130 devices from various manufacturers

     

    Plugin category Climate:

    - Carrier Furance

    - WS Davis Vantage

    - Nest - plugin for well-known thermostat

    - Netatmo - plugin for thermostat and weather station from netatmo

     

    Plugins category Multimedia

    - LG Bluray

    - LG TV*

    - NC + mediabox, compatible devices: mediaBOX+ (ITI-3740SX, ADB-3740SX) and turboBOX+ (ITI-5720SX, ADB-5720SX)

    - XBMC Remote Control

    - Denon Amplifier

    - LG Bluray

    - Onkyo Amplifier

    - Philips Bluray

    - Pioneer Amplifier

    - Samsung TV*

    - Sonos

    - Sony Bluray

    - Sony TV*

    - Logitech Harmony

    - DENON HEOS 3/link

    - Russound X5 Controller

    - Nuvo Gateway/NV-P3100/NV-P3500/P100/P200

     

    * some TV Sets firmware version may not be supported

     

    Plugins category Other

    - Philips Hue

    - Wake on LAN

    - Planika Fireplace

     

    Other changes, many other improvements to the system.

    0
  2. Alors avec "Repair from File" ça fonctionne nickel. Je viens de passer der V4.112 à V4.110. Mais ce que je ne comprends pas pourquoi les RAM sont utilisé à plus de 90% et le CPU tourne sans arrêt vers 11%.

    Pourtant j'ai que 2 Smoke Sensor et 1 Water Sensor et rien d'autres et elle me sert de passerelle pour ma HC2...

    ram_hcl.jpg

  3. Alors sur la HC2 un recovery revient sur le Firmware d'usine et sur la HCL il revient a parrement sur la dernière Version que il y avait déjà dessus.

     

    Mais je vais essayer ce soir de faire le Recovery sur ma HCL avec le fichier patch que je télécharge sur http://updatehcl.fibaro.com/4.110/ 

    recovery_hcl.jpg

     

    Oui V4.110 c'est la dernière stable et V4.112 c'est une béta.

  4. Vue que j'ai des soucis Avec la V4.112 sur ma HCL qui me sert de passerelle, j'aimerai faire un Recovery vers 4.110. J'ai fait hier le Recovery Avec reset de la puce Z-Wave, mais il me fait un Recovery vers la derniere Version 4.112. Comment faire pour revenir en V4.110 stable?

     

    Merci pour vos idées :-)

  5. Quand la simu  elle s'arrete ça devrait éteindre tout, et quand je désactive éteindre tout et allumer ID hall.

     

    Mais ça me mets une erreur:

    [DEBUG] 22:48:05: Fri 03/03 Presence Simulation | v3.6.1 Starting up
    [DEBUG] 22:48:05: Fri 03/03 --------------------------------------------------------------------------
    [DEBUG] 22:48:05: Fri 03/03 Current Unix Time: 1488577685
    [DEBUG] 22:48:05: Fri 03/03 converted Original planed End_simulation_time: 00:45 to Unix Time: 1488498300)
    [DEBUG] 22:48:05: Fri 03/03 converted Midnight: 0:0 to Unix Time: 1488495600)
    [DEBUG] 22:48:05: Fri 03/03 converted Sunset: 18:20 to Unix Time: 1488561600)
    [DEBUG] 22:48:05: Fri 03/03 stop hour <= 12, Added 24H to End_simulation_time (End_simulation_time is ending after midnignt)
    [DEBUG] 22:48:05: Fri 03/03 New End_simulation_time: 1488584700
    [DEBUG] 22:48:05: Fri 03/03 Calculated sleeping between each turn off: 8 min
    [DEBUG] 22:48:05: Fri 03/03 End_simulation_time_with_random_max_TurnOff: 1488586140
    [DEBUG] 22:48:05: Fri 03/03 Reverse converted Unix Time of Sunset unix time : 1488560700 To: 18:05
    [DEBUG] 22:48:05: Fri 03/03 Reverse converted Unix Time of Sunset unix time : 1488560700 To: 18:05
    [DEBUG] 22:48:05: Fri 03/03 Sunset is at 18:20 + Sunset Shift of -15min = Start Time at 18:05
    [DEBUG] 22:48:05: Fri 03/03 Reverse converted Unix Time of End Simulation : 1488584700 To: 00:45
    [DEBUG] 22:48:05: Fri 03/03 End of Simulation: 00:45 + random of 30min
    [DEBUG] 22:48:05: Fri 03/03 Checking for actions every minute.
    [DEBUG] 22:48:05: Fri 03/03 Current Unix Time: 1488577685
    [DEBUG] 22:48:05: Fri 03/03 converted Original planed End_simulation_time: 00:45 to Unix Time: 1488498300)
    [DEBUG] 22:48:05: Fri 03/03 converted Midnight: 0:0 to Unix Time: 1488495600)
    [DEBUG] 22:48:05: Fri 03/03 converted Sunset: 18:20 to Unix Time: 1488561600)
    [DEBUG] 22:48:05: Fri 03/03 stop hour <= 12, Added 24H to End_simulation_time (End_simulation_time is ending after midnignt)
    [DEBUG] 22:48:05: Fri 03/03 New End_simulation_time: 1488584700
    [DEBUG] 22:48:05: Fri 03/03 Calculated sleeping between each turn off: 2 min
    [DEBUG] 22:48:05: Fri 03/03 End_simulation_time_with_random_max_TurnOff: 1488585060
    [DEBUG] 22:48:05: Fri 03/03 Simu_presence = 0, Aborting Simulation scene
    [DEBUG] 22:55:40: Fri 03/03 Presence Simulation | v3.6.1 Starting up
    [DEBUG] 22:55:40: Fri 03/03 --------------------------------------------------------------------------
    [DEBUG] 22:55:40: Fri 03/03 Current Unix Time: 1488578140
    [DEBUG] 22:55:40: Fri 03/03 converted Original planed End_simulation_time: 00:45 to Unix Time: 1488498300)
    [DEBUG] 22:55:40: Fri 03/03 converted Midnight: 0:0 to Unix Time: 1488495600)
    [DEBUG] 22:55:40: Fri 03/03 converted Sunset: 18:20 to Unix Time: 1488561600)
    [DEBUG] 22:55:40: Fri 03/03 stop hour <= 12, Added 24H to End_simulation_time (End_simulation_time is ending after midnignt)
    [DEBUG] 22:55:40: Fri 03/03 New End_simulation_time: 1488584700
    [DEBUG] 22:55:40: Fri 03/03 Calculated sleeping between each turn off: 8 min
    [DEBUG] 22:55:40: Fri 03/03 End_simulation_time_with_random_max_TurnOff: 1488586140
    [DEBUG] 22:55:40: Fri 03/03 Reverse converted Unix Time of Sunset unix time : 1488560700 To: 18:05
    [DEBUG] 22:55:40: Fri 03/03 Reverse converted Unix Time of Sunset unix time : 1488560700 To: 18:05
    [DEBUG] 22:55:40: Fri 03/03 Sunset is at 18:20 + Sunset Shift of -15min = Start Time at 18:05
    [DEBUG] 22:55:40: Fri 03/03 Reverse converted Unix Time of End Simulation : 1488584700 To: 00:45
    [DEBUG] 22:55:40: Fri 03/03 End of Simulation: 00:45 + random of 30min
    [DEBUG] 22:55:40: Fri 03/03 Checking for actions every minute.
    [DEBUG] 22:55:40: Fri 03/03 Current Unix Time: 1488578140
    [DEBUG] 22:55:40: Fri 03/03 converted Original planed End_simulation_time: 00:45 to Unix Time: 1488498300)
    [DEBUG] 22:55:40: Fri 03/03 converted Midnight: 0:0 to Unix Time: 1488495600)
    [DEBUG] 22:55:40: Fri 03/03 converted Sunset: 18:20 to Unix Time: 1488561600)
    [DEBUG] 22:55:40: Fri 03/03 stop hour <= 12, Added 24H to End_simulation_time (End_simulation_time is ending after midnignt)
    [DEBUG] 22:55:40: Fri 03/03 New End_simulation_time: 1488584700
    [DEBUG] 22:55:40: Fri 03/03 Calculated sleeping between each turn off: 2 min
    [DEBUG] 22:55:40: Fri 03/03 End_simulation_time_with_random_max_TurnOff: 1488585060
    [DEBUG] 22:55:40: Fri 03/03 It's sunset time -> Simulation ON
    [DEBUG] 22:55:40: Fri 03/03 Reverse converted Unix Time of End_simulation_time : 1488584700 To: 00:45
    [DEBUG] 22:55:40: Fri 03/03 Reverse converted Unix Time of End_simulation_time_with_random_max_TurnOff : 1488585060 To: 00:51
    [DEBUG] 22:55:40: Fri 03/03 Reverse converted Unix Time of End_simulation_time : 1488584700 To: 00:45
    [DEBUG] 22:55:40: Fri 03/03 Reverse converted Unix Time of End_simulation_time_with_random_max_TurnOff : 1488585060 To: 00:51
    [DEBUG] 22:55:40: Fri 03/03 Presence Simulation started. Will stop at: 00:45 + rand(30min) : 00:51
    [DEBUG] 22:55:40: Fri 03/03 Turning On Always_On lights:
    [DEBUG] 22:55:40: Fri 03/03 Device: Lampe LED Turned On
    [DEBUG] 22:55:40: Fri 03/03 Now randomizing other lights...
    [DEBUG] 22:55:41: Fri 03/03 light ID:Eclairage Entrée status:1
    [DEBUG] 22:55:41: Fri 03/03 Entering loop of 23.05 minutes
    [DEBUG] 22:55:52: Scene already active! Aborting this new instance !!
    [DEBUG] 22:56:02: Fri 03/03 Exiting loop of 23.05 minutes
    [DEBUG] 22:56:02: Fri 03/03 TurnOff All Simulation lights!
    [DEBUG] 22:56:02: Fri 03/03 Device: Eclairage Salon Spot Off
    [DEBUG] 22:56:02: Fri 03/03 Sleeping 0 minute(s) before next TurnOff
    [DEBUG] 22:56:02: Fri 03/03 Device: Eclairage Entrée Off
    [DEBUG] 22:56:02: Fri 03/03 Sleeping 0 minute(s) before next TurnOff
    [DEBUG] 22:56:02: line 334: attempt to concatenate local 'deviceID' (a nil value)

     

    Voici mon code:

    Citation
    --[[
    %% autostart
    %% properties
    %% globals
    Simu_presence
    --]]
    ---------------------------------------
    local version = "3.6.1";
    -- YAPS Presence Simulation by SebcBien
    -- August 2015
    ---------------------------------------
    --V3.6.1 -- added new notifications engine (sms, freesms, push, email)
    -- fixed bug "attempt to concatenate local 'deviceID' (a nil value)"
    --V3.5.2 - start push sent by email
    --V3.5.1
    -- Fixed launch between midnight and endtime (if endtime is after midnight)
    -- clean up code midnight-endtime
    --V3.3.2
    -- renamed all variables for more readability
    --V3.3.0
    -- Fixed Override bug (no sleep time between lights)
    --V3.2.3
    -- added sunset shifting possibility (add or remove minutes to startime
    -- added time stamp to push messages
    -- formated messages
    -- optimisation
    -- cleanup
    --V3.1.0
    -- "complete" rewriting with unix times
    -- modified end time notification impacted by random and smooth TurnOff (End_simulation_time impact)
    -- exit is now exactly at End_simulation_time
    -- added smooth cut off of lights at ending time (function not triggered with deactivation)
    --V2.6.6
    -- clean up debug messages
    -- added free sms notifications
    -- second fix to looping days bug
    --V2.6.0 to V2.6.5
    -- Fixed bug when Random_max_TurnOff_duration = 0
    -- Probably fixed End_simulation_time bug calculation when looping for days du to days are shorter now than the previous day
    -- Fixed bug not turning on Lights_On_at_end_Simulation when exiting Simulation
    -- added random end time + small stability changes and cleaning
    -- Added array of lights to turn on after Simulation, ONLY if Simu_presence = 1 (normal ending, not ended by setting Simu_presence to 0)
    -- Added the possibility to not have an always on lamp
    -- Added naming of devices in the debug during Simulation
    -- Added the possibility to select always on light during Simulation
    --V2.2.0 to 2.5.0
    -- fixed Simulation starting if restarted between End_simulation_time & midnight
    -- fixed big bug Simulation restarting after end time
    -- small notification and debug changes
    -- Rewriting the engine
    -- now relaunch automatically the next day, even if Simu_presence has not changed
    -- Added Manual Stop variable
    -- added list of mobiles
    if (fibaro:countScenes() > 1) then
     fibaro:debug("Scene already active! Aborting this new instance !!");
     fibaro:abort();
    end
    --------------------- USER SETTINGS --------------------------------
    local id = {
     LAMPE_SALON_SPOT = 81,
     LAMPE_TERR_GAUCHE = 191,
     LAMPE_TABLE   = 197,
     LAMPE_CUISINE  = 198,
     LAMPE_HALL   = 202,
     LAMPE_LED_SALON  = 203,
     LAMPE_TERR_GAUCHE = 206,
     LAMPE_ESCALIER  = 213,
     PHONE_PAPA   = 227,
     ADMIN     = 2,
     }
    local Stop_hour = "00";     -- Hour when you want Simulation to stop
    local Stop_minute = "45";    -- Minute of the hour you want Simulation to stop
    -- note 1: the script will not exit while waiting the random time of the last light turned on. So end time can be longer than specified end time. (even more with var Random_max_TurnOff_duration)
    -- note 2: if the global variable changes during the same wait time as above, it will exit immediately (when back home while Simulation runs)
    local Sunset_offset = -15    -- number of minutes before or after sunset to activate Simulation
    local Random_max_duration = 30;   -- random time of light change in minutes --> here each device is on maximum 30min
    local Random_max_TurnOff_duration = 30; -- random time to add at the stop hour+stop minute so the Simulation can be more variable (0 to deactivate)
    local Lights_always_on = {id["LAMPE_LED_SALON"]} -- IDs of lights who will always stay on during Simulation - leave empty array if none -> {}
    local Random_lights = {id["LAMPE_SALON_SPOT"],id["LAMPE_HALL"],id["LAMPE_TAPLE"],id["LAMPE_CUISINE"]} -- IDs of lights to use in Simulation
    --local Random_lights = {id["LAMPE_HALL"],id["LAMPE_CELLIER"],id["LAMPE_CH_AMIS"]} -- Reduced set for test purposes
    local Lights_On_at_end_Simulation = 0; -- If next line is commented, no light will turn on after Simulation ends
    -- local Lights_On_at_end_Simulation = id["LAMPE_COULOIR"]; -- ID of a light (Only One) to turn on after Simulation ends (at specified Stop_hour & Stop_minute). Comment this line to turn off this feature
    local Lights_On_if_Simulation_deactivated = 0; -- If next line is commented, no light will turn on after Simulation is stopped (by putting Simu_presence to 0)
    local Lights_On_if_Simulation_deactivated = id["LAMPE_HALL"]; -- ID of a light (Only One) to turn on after Simulation is stopped (Simulation_). Comment this line to turn off this feature
    YAPS_Engine = {};
     YAPS_Engine.notifications = true;     -- send notifications
     YAPS_Engine.notificationTypes = {"push", "email"}; --notification types {"push", "email", "sms"} but they are overriden in the code
     YAPS_Engine.Activate_FreeSms = false;    -- activate push with Activate_FreeSms (Activate_Push must be true also)
     YAPS_Engine.smartphoneID = {id["PHONE_PAPA"]};  -- Smartphone Id to send push to. {id1, id2, id3}
     YAPS_Engine.userID = {id["ADMIN"]};     -- User Id to send email to. {id1, id2, id3}
     YAPS_Engine.sms = {
      ["VD_ID"] = 0,         -- Virtual Device ID
      ["VD_Button"] = "1",       -- Virtual Device Button
      ["VG_Name"] = "SMS"};       -- Global Variable Name
    --------------------- USER SETTINGS END ----------------------------
    ----------------------ADVANCED SETTINGS-----------------------------
    local Show_standard_debug = true; -- Debug displayed in white
    local Show_extra_debug = true;  -- Debug displayed in orange
    --------------------------------------------------------------------
    -------------------- DO NOT CHANGE CODE BELOW ----------------------
    --------------------------------------------------------------------
    local Number_of_lights = #Random_lights;      -- numbers of light devices listed above
    local Simulation = fibaro:getGlobal("Simu_presence");   --value of the global value: Simulation is on or off
    local Manual_overide = fibaro:getGlobal("overideSimuSunset"); -- if = 1 then the Simulation is forced
    local Start_simulation_time = fibaro:getValue(1, "sunsetHour"); --Start Simulation when sunset
    local End_simulation_time,Sunrise_unix_hour,Sunset_unix_hour,Converted_var,Midnight,End_simulation_time_with_random_max_TurnOff,Sleep_between_TurnOff;
    local Is_first_launch = true;
    local NotifLoop = 0;
    function Debug(color, message)
      fibaro:debug(string.format('<%s style="color:%s;">%s</%s>', "span", color, os.date("%a %d/%m", os.time()).." "..message, "span"));
    end
    function ExtraDebug(debugMessage)
     if ( Show_extra_debug ) then
      Debug( "orange", debugMessage);
     end
    end
    function StandardDebug(debugMessage)
     if ( Show_standard_debug ) then
      Debug( "white", debugMessage);
     end
    end
    function round(num, idp)
     local mult = 10^(idp or 0)
     return math.floor(num * mult + 0.5) / mult
    end
    function YAPS_Engine:notification(message, subject, param)
     local message = os.date("%H:%M", os.time()).." "..message or "<vide>";
     if YAPS_Engine.debug_messages then
      ExtraDebug("yellow", "Notification : "..message);
     end
      if Activate_FreeSms then
       fibaro:setGlobal("Activate_FreeSms", message)
       ExtraDebug("Message ("..message..") sent to Activate_FreeSms");
      end
     if param then
      for _, notif in ipairs(param) do
       if YAPS_Engine.debug_messages then
        ExtraDebug("grey", notif);
       end
       -- Envoi Push
       if notif == "push" and YAPS_Engine.smartphoneID then
        for _, id in ipairs(YAPS_Engine.smartphoneID) do
         if YAPS_Engine.debug_messages then
          ExtraDebug("grey", "Send Push smartphone ID : "..id);
         end
         fibaro:call(id, "sendPush", message);
        end
       -- Envoi Email
       elseif notif == "email" and YAPS_Engine.userID then
        for _, id in ipairs(YAPS_Engine.userID) do
         if YAPS_Engine.debug_messages then
          ExtraDebug("grey", "Send Email user ID : "..id);
         end
         fibaro:call(id, "sendEmail", subject, message);
        end
       -- Envoi SMS
       elseif notif == "sms" and YAPS_Engine.sms then
        if YAPS_Engine.debug_messages then
         ExtraDebug("grey", "Send SMS : VD_ID="..(YAPS_Engine.sms["VD_ID"] or 0).." VD_Button="..(YAPS_Engine.sms["VD_Button"] or "0").." VG_Name="..(YAPS_Engine.sms["VG_Name"] or ""));
        end
        fibaro:setGlobal(YAPS_Engine.sms["VG_Name"], message);
        if YAPS_Engine.sms["VD_ID"] and tonumber(YAPS_Engine.sms["VD_ID"])>0 and YAPS_Engine.sms["VD_Button"] and tonumber(YAPS_Engine.sms["VD_Button"])>0 then
         fibaro:call(YAPS_Engine.sms["VD_ID"], "pressButton", YAPS_Engine.sms["VD_Button"]);
        end
       end
      end
     else
      Debug("orange", "Warning : no notification options given");
     end
    end
    function YAPS_Engine:UnixTimeCalc(Converted_var, hour, min)
     local time = os.time();
     local date = os.date("*t", time);
     local year = date.year;
     local month = date.month;
     local day = date.day;
     unix_hour = os.time{year=year, month=month, day=day, hour=hour, min=min, sec=sec};
     ExtraDebug("converted "..Converted_var..": "..hour..":"..min.." to Unix Time: "..unix_hour..")")
     return unix_hour
    end
    function YAPS_Engine:ReverseUnixTimeCalc(Converted_var,hour)
     reverse_unix = os.date("%H:%M", hour)
     ExtraDebug("Reverse converted Unix Time of "..Converted_var.." : "..hour.." To: "..reverse_unix)
     return reverse_unix
    end
    function YAPS_Engine:EndTimeCalc()
     local hour,min
     ExtraDebug ("Current Unix Time: "..os.time())
     End_simulation_time = YAPS_Engine:UnixTimeCalc("Original planed End_simulation_time", Stop_hour, Stop_minute); -- generate End_simulation_time (changes at midnight) will not change during Simulation, only when ended
     Midnight = YAPS_Engine:UnixTimeCalc("Midnight", 00, 00);
     
     Sunset_unix_hour = fibaro:getValue(1,'sunsetHour');
     hour = string.sub(Sunset_unix_hour, 1 , 2);
     min = string.sub(Sunset_unix_hour,4);
     Sunset_unix_hour = (YAPS_Engine:UnixTimeCalc("Sunset", hour, min))+Sunset_offset*60;
     -- if stop hour is between 00 and 12h then add 24 hours to End_simulation_time
     if tonumber(Stop_hour) <= 12 and (os.time() >= End_simulation_time) then
      End_simulation_time = End_simulation_time + 24*60*60
      ExtraDebug ("stop hour <= 12, Added 24H to End_simulation_time (End_simulation_time is ending after midnignt)");
      ExtraDebug ("New End_simulation_time: "..End_simulation_time);
     end
     
     if Random_max_TurnOff_duration ~= 0 and Number_of_lights > 1 then   -- if Simulation = 1 then slow turn off, else turn off all immediately
      Sleep_between_TurnOff = round((math.random(Random_max_TurnOff_duration)/(Number_of_lights-1)),1);
      Sleep_between_TurnOff = math.random(Random_max_TurnOff_duration)/(Number_of_lights-1);
      ExtraDebug("Calculated sleeping between each turn off: "..Sleep_between_TurnOff.." min");
     else
      Sleep_between_TurnOff = 0;
      ExtraDebug("No sleeping between turn off");
     end
     End_simulation_time_with_random_max_TurnOff = End_simulation_time + ((Sleep_between_TurnOff*(Number_of_lights-1))*60)
     ExtraDebug("End_simulation_time_with_random_max_TurnOff: "..End_simulation_time_with_random_max_TurnOff); 
     
     if ((os.time() < End_simulation_time) and (Sunset_unix_hour - End_simulation_time > 0) and (Is_first_launch == true)) then -- if calculation is done between midnight and End_simulation_time and sunset is wrongly calculated after endtime (at first start only)
      Sunset_unix_hour = Sunset_unix_hour - (24*60*60) + 70; -- remove 24h58m50s of sunsettime
      ExtraDebug ("launch after Midnight and before End_simulation_time, removed 24H to Sunset_unix_hour (Only at the first start)");
      ExtraDebug ("New SunsetTime: "..Sunset_unix_hour);
     end
     Is_first_launch = false
    end
    -- Presence Simulation actions Main loop
    function YAPS_Engine:Launch()
     YAPS_Engine:notification("Presence Simulation started. Will stop at: "..YAPS_Engine:ReverseUnixTimeCalc("End_simulation_time", End_simulation_time).." + rand("..Random_max_TurnOff_duration.."min) : "..YAPS_Engine:ReverseUnixTimeCalc("End_simulation_time_with_random_max_TurnOff", End_simulation_time_with_random_max_TurnOff), "Presence Simulator", {"push"}); -- push only
     StandardDebug("Presence Simulation started. Will stop at: "..YAPS_Engine:ReverseUnixTimeCalc("End_simulation_time", End_simulation_time).." + rand("..Random_max_TurnOff_duration.."min) : "..YAPS_Engine:ReverseUnixTimeCalc("End_simulation_time_with_random_max_TurnOff", End_simulation_time_with_random_max_TurnOff)); 
     if Lights_always_on[1] ~= nil then YAPS_Engine:TurnOn(Lights_always_on); end
     while ((os.time() <= End_simulation_time) and (Simulation == "1")) or ((Manual_overide == "1")) do
      local random_light = tonumber(Random_lights[math.random(Number_of_lights)]) --choose a random light in the list
      local lightstatus = fibaro:getValue(random_light, 'value') --get the value of the random light in the list
      -- turn on the light if off or turn off if on
      if tonumber(lightstatus) == 0 then fibaro:call(random_light, 'turnOn') else fibaro:call(random_light, 'turnOff') end
      fibaro:sleep(1000); -- necessary to get back the new status, because HC2 is too fast :-)
      lightstatus = fibaro:getValue(random_light, 'value') --get the value of the random light after his update
      StandardDebug('light ID:'.. fibaro:getName(random_light) ..' status:'..lightstatus);
      local sleeptime = math.random(Random_max_duration*60000) --random sleep
      StandardDebug("Entering loop of " .. round(sleeptime/60000,2) .. " minutes");
      -- Allows to exit the scene if the Simu_presence global var changes to 0 during the random  sleep
       local counterexitSimulation = 200
        while (counterexitSimulation > 0) and ((os.time() <= End_simulation_time) or Manual_overide == "1") do
         counterexitSimulation = counterexitSimulation - 1;
         test_presence_state = fibaro:getGlobal("Simu_presence");
         Simulation = tonumber(test_presence_state); --verify the global value, if the virtual device is deactivated, the loop stops.
         --fibaro:debug("Simulation var state : " .. Simulation.." override var state : " .. Manual_overide);
         if Simulation == 0 then
          Manual_overide = fibaro:getGlobalValue("overideSimuSunset");
          if Simulation == 0 or Manual_overide == "0" then
          counterexitSimulation = 0
          end
         end
        fibaro:sleep(sleeptime/200);
        end
       ExtraDebug("Exiting loop of "..round(sleeptime/60000,2).." minutes");
      local sleeptimemin = math.abs(sleeptime/60000)
      Simulation = fibaro:getGlobal("Simu_presence"); --verify the global value, if the virtual device is deactivated, the scene stops.
      Manual_overide = fibaro:getGlobalValue("overideSimuSunset");
     end
    end
     
    function YAPS_Engine:EndSimulation()
     if Lights_always_on[1] ~= nil then YAPS_Engine:TurnOff(Random_lights,Lights_always_on); end
     Debug("red","Presence Simulation deactivated");
     if (Simulation == "1") then
      Debug("yellow","Presence Simulation will restart tomorrow.");
      Debug("yellow","Sunset is around "..fibaro:getValue(1, "sunsetHour").." + Sunset Shift of "..Sunset_offset.."min = Start Time around "..YAPS_Engine:ReverseUnixTimeCalc("Sunset unix time", Sunset_unix_hour));
      YAPS_Engine:notification("Presence Simulation will restart tomorrow. Sunset is around "..fibaro:getValue(1, "sunsetHour").." + Sunset Shift of "..Sunset_offset.."min = Start Time around "..YAPS_Engine:ReverseUnixTimeCalc("Sunset unix time", Sunset_unix_hour), "Presence Simulator", {"push"}); -- push only
     end
     NotifLoop = 0; -- will force main loop notifications at end of Simulation
    end
    function YAPS_Engine:ExitSimulation()
     --YAPS_Engine:notification("Presence Simulation is terminated", "Presence Simulator", {"push"}); -- push only
     Debug("red","Simu_presence = 0, Aborting Simulation scene");
     fibaro:abort();
    end
    function YAPS_Engine:TurnOff(group,group2)
     Debug("red","TurnOff All Simulation lights!");
     local name, id2;
     local ID_devices_group = group;
     if ID_devices_group ~= 0 then
      for i=1, #ID_devices_group do
       Simulation = fibaro:getGlobal("Simu_presence"); --verify the global value, if Simulation presence is deactivated
       if Simulation == "0" then Sleep_between_TurnOff = 0; end; -- if Simulation ended before End_simulation_time, then no turn off delay
       if i > 1 then -- wait Number of lights -1 (do not need to wait for the first TurnOff)
        StandardDebug("Sleeping "..Sleep_between_TurnOff.." minute(s) before next TurnOff");
        fibaro:sleep(Sleep_between_TurnOff*60000);
       end
       id2 = tonumber(ID_devices_group);
       fibaro:call(id2, "turnOff");
       name = fibaro:getName(id2);
       if (name == nil or name == string.char(0)) then
        name = "Unknown"
       end
       StandardDebug("Device: "..name.." Off ");
      end
     end
     Debug("red","TurnOff All Always_On lights!");
     local ID_devices_group = group2;
     if ID_devices_group ~= 0 then
      for i=1, #ID_devices_group do
       id2 = tonumber(ID_devices_group);
       fibaro:call(id2, "turnOff");
       name = fibaro:getName(id2);
        if (name == nil or name == string.char(0)) then
         name = "Unknown"
        end
       StandardDebug("Device: "..name.." Off ");
      end
     end
     if Lights_On_at_end_Simulation ~= 0 and Simulation == "1" then
      fibaro:call(Lights_On_at_end_Simulation, "turnOn");
      name = fibaro:getName(Lights_On_at_end_Simulation);
       if (name == nil or name == string.char(0)) then
        name = "Unknown"  
       end
      Debug("red","Turned On light Lights_On_at_end_Simulation:");
      Debug("white", name);
     end
     if Lights_On_if_Simulation_deactivated ~= 0 and Simulation == "0" then
      fibaro:call(Lights_On_if_Simulation_deactivated, "turnOn");
      name = fibaro:getName(Lights_On_if_Simulation_deactivated);
       if (name == nil or name == string.char(0)) then
        name = "Unknown"
       end
      Debug("red","Turned On light Lights_On_if_Simulation_deactivated:");
      Debug("white", name);
     end
    end
    function YAPS_Engine:TurnOn(group)
     Debug("red","Turning On Always_On lights:");
     local name, id2;
     local ID_devices_group = group;
     for i=1, #ID_devices_group do
      id2 = tonumber(ID_devices_group);
      fibaro:call(id2, "turnOn");
      name = fibaro:getName(id2);
      if (name == nil or name == string.char(0)) then
       name = "Unknown"  
      end
      StandardDebug("Device: "..name.." Turned On ");
     end
     Debug("red","Now randomizing other lights...");
    end
     
    Debug("green", "Presence Simulation | v" .. version .. " Starting up");
    Debug("green", "--------------------------------------------------------------------------");
    ------------------------ Main Loop ----------------------------------
    -- first start notifications
    YAPS_Engine:EndTimeCalc();
    YAPS_Engine:notification("Scheduled presence Simulation at "..YAPS_Engine:ReverseUnixTimeCalc("Sunset unix time", Sunset_unix_hour).." (Sunset: "..fibaro:getValue(1, "sunsetHour")..")", "Presence Simulator", {"email"}); -- mail only
    Debug("green","Sunset is at "..fibaro:getValue(1, "sunsetHour").." + Sunset Shift of "..Sunset_offset.."min = Start Time at "..YAPS_Engine:ReverseUnixTimeCalc("Sunset unix time", Sunset_unix_hour));
    Debug("green","End of Simulation: "..YAPS_Engine:ReverseUnixTimeCalc("End Simulation", End_simulation_time).." + random of "..Random_max_TurnOff_duration.."min");
    Debug("green", "Checking for actions every minute.");
    Is_first_launch = true
    while true do -- Infinite loop of actions checking, hours calculations, notifications
     YAPS_Engine:EndTimeCalc();
     -- local Sunset_unix_hour = Midnight  -- un-comment this line when testing to force a start hour (or use Sunset_offset)
     if os.time() >= Sunset_unix_hour then -- define if nighttime (sunset = 1)
      sunset = 1
     else
      sunset = 0
     end
     
     if (Simulation == "1") then
      if sunset == 1 and (os.time() <= End_simulation_time) then
       Debug("yellow", "It's sunset time -> Simulation ON");
       YAPS_Engine:Launch();
       YAPS_Engine:EndSimulation();
      end
      if Manual_overide == "1" then
       Debug("yellow", "Manual Override Activated -> Simulation ON");
       YAPS_Engine:Launch();
       YAPS_Engine:EndSimulation();
      end
      if Manual_overide == "0" and sunset == 0 and NotifLoop == 0 then
       Debug("yellow", "Sunset is at "..fibaro:getValue(1, "sunsetHour").." + Sunset Shift of "..Sunset_offset.."min = Start Time at "..YAPS_Engine:ReverseUnixTimeCalc("Sunset unix time", Sunset_unix_hour));
       Debug("yellow", "End of Simulation: "..YAPS_Engine:ReverseUnixTimeCalc("End Simulation", End_simulation_time).." + random of "..Random_max_TurnOff_duration.."min = "..YAPS_Engine:ReverseUnixTimeCalc("End Simulation", End_simulation_time_with_random_max_TurnOff));
      end
     end
     if (Simulation == "0") then -- Condition to end Simulation
      YAPS_Engine:ExitSimulation();
     end
     
     if NotifLoop <= 120 then --a waiting xx times the fibaro sleep below (2 hours) before resetting counter (and notifying)
      if NotifLoop == 120 then NotifLoop = 0 end
      if NotifLoop == 0 then
      ExtraDebug("Now, checking for actions every minute. Next notify: in 2 hours");
      end
     end
      
     fibaro:sleep(1*60*1000); -- wait 1 minutes before testing again the global vars below
     Simulation = fibaro:getGlobal("Simu_presence");
     Manual_overide = fibaro:getGlobal("overideSimuSunset");
     NotifLoop = NotifLoop + 1;
    end

     

    Je suis en V4.111 béta... Quelqu'un peut m'aider?

  6. Moi je n'ai pas la keyfob. Je voulais reconfigurer le maillage du réseau Z-Wave et la LED z-wave est resté allumé. J'ai arrété la HC2, couper le courant pendant env. 15sec. et je l'ai démarré normalement.

    Maintenant ça fonctionne. Le réseau Z-Wave répond à sa vitesse normale.

     

    J'ai vu sur le forum officiel sous 4.111 beta d'autres qui ont le même souci.

  7. En V4.110 ça fonctionnait bien. Maintenant je suis en béta V4.111 et j'ai une Erreur:

     

    [ERROR] 07:31:18: line 15: unexpected symbol near 'local' -> sur cette ligne: local maxRetry_Process = 20;

     

    J'utilise la Version 2.31b ^_^

     

    Que est-ce que y a changé dans V4.111?

     

  8. Hello

     

    J'ai quand même un souci. Aujourd'hui et demain chez c'est jours chomé...:-( Eh ben non ou est le souci?

     

    Voici mon Code:

     

    -- Retourne OUI si le jour courant et J+1 est un jour chômé (WE ou férié)
    -- Adapté de http://gurau-audibert.hd.free.fr/josdblog/2014/01/lua-vacances-jours-chomes-et-jours-feries/
    -- Pour la HC2 par Hansolo
    -- V1 26/06/2014 Initié par HANSOLO
    -- V2 27/06/2014 Amélioré par STEVEN, gestion des JS SUISSE et calcul J et J+1
     
    local france = false	
    local suisse = true	
    local geneve = false
    
    -- Retourne le jour de la semaine en clair
    function josdGetJourSemaine(jour)
    	--fibaro:debug ("jour: ")
    	josdGetJourSemaineTab={[0]="dimanche",[1]="lundi",[2]="mardi",[3]="mercredi",[4]="jeudi",[5]="vendredi",[6]="samedi"}
    	return josdGetJourSemaineTab[tonumber(jour)]
    end
     
    -- Retourne le jour de Pâques au format epoch
    -- annee : année (Integer) dont on désire connaître le jour de Pâques (ex : 2014)
    function josdGetJourPaques(annee)
    	local a=math.floor(annee/100);
    	local b=math.fmod(annee,100);
    	local c=math.floor((3*(a+25))/4);
    	local d=math.fmod((3*(a+25)),4);
    	local e=math.floor((8*(a+11))/25);
    	local f=math.fmod((5*a+b),19);
    	local g=math.fmod((19*f+c-e),30);
    	local h=math.floor((f+11*g)/319);
    	local j=math.floor((60*(5-d)+b)/4);
    	local k=math.fmod((60*(5-d)+b),4);
    	local m=math.fmod((2*j-k-g+h),7);
    	local n=math.floor((g-h+m+114)/31);
    	local p=math.fmod((g-h+m+114),31);
    	local jour=p+1;
    	local mois=n;
    	josdGetJourPaquesAnnee=annee;
    	josdGetJourPaquesEpochPaque=os.time{year=annee,month=mois,day=jour,hour=12,min=0};
    	return josdGetJourPaquesEpochPaque;
    end
     
    -- Retourne true si le jour courant est un jour férié
    function josdJourFerie(time)
    	local today=os.date("%m-%d", time);
    	local annee=tonumber(os.date("%Y", time));
    	-- Dates fixes
    	josdJourFerieTab = {}
    	local epochPaques=josdGetJourPaques(annee);
    	if (france) then
    		josdJourFerieTab["01-01"] = true; -- 1er janvier
    		josdJourFerieTab["05-01"] = true; -- Fête du travail
    		josdJourFerieTab["05-08"] = true; -- Victoire des alliés
    		josdJourFerieTab["07-14"] = true; -- Fête nationale
    		josdJourFerieTab["08-15"] = true; -- Assomption
    		josdJourFerieTab["11-01"] = true; -- Toussaint
    		josdJourFerieTab["11-11"] = true; -- Armistice
    		josdJourFerieTab["12-25"] = true; -- Noà«l
    		-- Dates variables
    		josdJourFerieTab[os.date("%m-%d",epochPaques)] = true;             -- Pâques
    		josdJourFerieTab[os.date("%m-%d",epochPaques+24*60*60)] = true;    -- Lundi de Pâques = Pâques + 1 jour
    		josdJourFerieTab[os.date("%m-%d",epochPaques+24*60*60*39)] = true;  -- Ascension = Pâques + 39 jours
    		josdJourFerieTab[os.date("%m-%d",epochPaques+24*60*60*50)] = true; -- Pentecôte = Ascension + 50 jours
    	end
    	if (suisse) then 
    		josdJourFerieTab["01-01"] = true; -- 1er janvier
    		josdJourFerieTab["08-01"] = true; -- Fête national
    		josdJourFerieTab["12-25"] = true; -- Noà«l
    		-- Dates variables
    		if (geneve) then 
    			josdJourFerieTab[jeuneGenevois(time)] = true;             -- jeunes genevois
    		else
    			josdJourFerieTab[jeuneFederal(time)] = true;             -- jeunes genevois
    		end
    		josdJourFerieTab[os.date("%m-%d", epochPaques)] = true;             -- Pâques
    		josdJourFerieTab[os.date("%m-%d", epochPaques+24*60*60)] = true;    -- Lundi de Pâques = Pâques + 1 jour
    		josdJourFerieTab[os.date("%m-%d", epochPaques+24*60*60*39)] = true;  -- Ascension = Pâques + 39 jours
    		josdJourFerieTab[os.date("%m-%d", epochPaques+24*60*60*50)] = true; -- Pentecôte = Ascension + 50 jours
    		josdJourFerieTab[os.date("%m-%d", epochPaques-48*60*60)] = true;  -- Vendredi-saint = Pâques - 2 jour
    	end
    	return josdJourFerieTab[today]; -- (nldr : Both nil and false make a condition false)
    end
     
     -- Calcul le jeudi qui suit le 1er dimanche de septembre
    function jeuneGenevois(time)
      	local jour = 1
    	local annee = tonumber(os.date("%Y", time))
    	while (os.date("%A", os.time{year=annee, month=9, day=jour}) ~= "Sunday") do
    		jour = jour + 1
    	end
    	return os.date("%m-%d", os.time{year=annee, month=9, day=(jour+4)})
    end
     
    -- Calcul le lundi qui suit le 3ème dimanche de septembre
    function jeuneFederal(time)
      	local jour = 1
    	local annee = tonumber(os.date("%Y", time))
    	while (os.date("%A", os.time{year=annee, month=9, day=jour}) ~= "Sunday") do
    		jour = jour + 1
    	end
    	return os.date("%m-%d", os.time{year=annee, month=9, day=(jour+15)})
    end
    -- JOURS DE VACANCES ET SCOLAIRE
     function josdJourVacances()
    local today=os.date("%Y-%m-%d")
      local vacances=false
    
           -- 2016
    if ("2016-07-09"<=today and today<"2016-08-24") then vacances=true -- Vacances d'été
    
          -- 2016-2017
    elseif ("2016-10-18"<=today and today<"2016-11-03") then vacances=true -- Toussaint Zones
    elseif ("2016-12-20"<=today and today<"2017-01-05") then vacances=true -- Noël
    elseif ("2017-02-25"<=today and today<"2017-03-05") then vacances=true -- Hiver Zone C
    elseif ("2017-04-08"<=today and today<"2017-04-23") then vacances=true -- Printemps Zone C
    elseif ("2015-07-08"<=today and today<"2017-08-23") then vacances=true -- Vacances d'été
    
          -- 2017-2018
    elseif ("2017-10-14"<=today and today<"2015-10-29") then vacances=true -- Toussaint
    elseif ("2017-12-23"<=today and today<"2018-01-07") then vacances=true -- Noël
    elseif ("2018-02-10"<=today and today<"2018-02-18") then vacances=true -- Hiver Zone C
    elseif ("2018-03-30"<=today and today<"2018-04-15") then vacances=true -- Printemps Zone C
    elseif ("2018-07-07"<=today and today<"2018-08-22") then vacances=true -- Vacances d'été
    
            -- 2018-2019
    elseif ("2018-10-13"<=today and today<"2018-10-28") then vacances=true -- Toussaint
    elseif ("2018-12-22"<=today and today<"2019-01-06") then vacances=true -- Noël
    elseif ("2019-03-02"<=today and today<"2019-03-10") then vacances=true -- Hiver Zone C
    elseif ("2019-04-13"<=today and today<"2019-04-28") then vacances=true -- Printemps Zone C
    elseif ("2019-07-06"<=today and today<"2019-08-28") then vacances=true -- Vacances d'été
    
            end
    return vacances
    end
     
     -- Affiche le résultat
    function display(jour, result, label, variable, time)
    	selfId = fibaro:getSelfId()
    	fibaro:debug ("Jour chomé: " .. result)
    	-- Mise à  jour de la variable globale
    	if (variable) then fibaro:setGlobal(variable, result) end
    	-- Mise à  jour du label du module virtuel
    	fibaro:call(selfId,"setProperty","ui."..label..".value", jour .. " " .. os.date("%d.%m.%Y ",time).." Jour chomé: ".. result) 
    end
     -- Lancement du calcul
    function doCalculate(time, label, variable)
    	local jour = josdGetJourSemaine(os.date("%w", time))
    	josdJourChomeReturn = (jour=="samedi" or jour=="dimanche" or josdJourFerie(time) or josdJourVacances())
    	if josdJourChomeReturn then
    		display(jour, "OUI", label, variable, time)
    	else
    		display(jour, "NON", label, variable, time)
    	end
    end
     
    doCalculate(os.time(), "Label1", "JourChome")
    doCalculate(os.time()+24*60*60, "Label2", "JourChomeJ1")

    Je ne voit pas ou est le problème ?

     

    Merci pour l'aide :-)

     

     

  9. Hello,

     

    Moi j'ai une erreur sur:

    local f=math.fmod((5*a+,19);  Error:  [ERROR] 11:57:34: line 26: unexpected symbol near ','

     

    -- Retourne le jour de Pâques au format epoch
    -- annee : année (Integer) dont on désire connaître le jour de Pâques (ex : 2014)
    function josdGetJourPaques(annee)
     local a=math.floor(annee/100);
     local b=math.fmod(annee,100);
     local c=math.floor((3*(a+25))/4);
     local d=math.fmod((3*(a+25)),4);
     local e=math.floor((8*(a+11))/25);
     local f=math.fmod((5*a+,19);
     local g=math.fmod((19*f+c-e),30);
     local h=math.floor((f+11*g)/319);
     local j=math.floor((60*(5-d)+b)/4);
     local k=math.fmod((60*(5-d)+,4);
     local m=math.fmod((2*j-k-g+h),7);
     local n=math.floor((g-h+m+114)/31);
     local p=math.fmod((g-h+m+114),31);
     local jour=p+1;
     local mois=n;
     josdGetJourPaquesAnnee=annee;
     josdGetJourPaquesEpochPaque=os.time{year=annee,month=mois,day=jour,hour=12,min=0};
     return josdGetJourPaquesEpochPaque;
    end

     

    Ou est l'erreur?

  10. J'ai mis l'id du Motion et LUX

     

    --[[
    %% autostart
    %% properties
    144 value
    146 value
    %% globals
    --]]

     

    Voici mon bout de code:

     

    -- Escalier
     
    -- Exctinction automatique après 3 min
    local extinction = GEA.add( id["ECL__ESCALIER"], 3*60,"",{{"turnOff", id["ECL__ESCALIER"]}})
    -- Allumage automatique lampe sur detection --
    -- local detection = GEA.add( id["MOTION_ESCALIER"], -1,"", {{"turnOn", id["ECL__ESCALIER"]}, {"RestartTask", extinction}})
    local detection = GEA.add( {id["MOTION_ESCALIER"]},{"Value-", id["DETECTEUR_LUX_ESCALIER"], 260}, -1,"", {{"turnOn", id["ECL__ESCALIER"]}, {"RestartTask", extinction}})
      -- Allumage manuel lampe --
    GEA.add(id["ECL__ESCALIER"], -1, "", {{"StopTask", extinction}, {"StopTask", detection}})
    -- Exctinction de la lampe
    GEA.add(id["ECL__ESCALIER"], -1, "", {{"Inverse"}, {"RestartTask", detection}})

     

    Maintenant il me mets une erreur:  "Attempt to compare with nil" sur cette ligne -> if (GEA.source["type"] == "autostart" and tonumber(entry[GEA.keys["SECONDES"]]) >= 0) then

     

    Comprends pas... Désolé

  11. Gestion allumage automatique cage escalier si LUX > 260

     

    J'ai ce code pour allumer et etindre la lumiere de la cage d'escalier avec "Motion Escalier" et le bouton "ECL_ESCALIER"

     

    -- Escalier
     
    -- Exctinction automatique après 3 min
    local extinction = GEA.add( id["ECL__ESCALIER"], 3*60,"",{{"turnOff", id["ECL__ESCALIER"]}})
    -- Allumage automatique lampe sur detection --
    local detection = GEA.add( id["MOTION_ESCALIER"], -1,"", {{"turnOn", id["ECL__ESCALIER"]}, {"RestartTask", extinction}})
      -- Allumage manuel lampe --
    GEA.add(id["ECL__ESCALIER"], -1, "", {{"StopTask", extinction}, {"StopTask", detection}})
    -- Exctinction de la lampe
    GEA.add(id["ECL__ESCALIER"], -1, "", {{"Inverse"}, {"RestartTask", detection}})

     

    J'aimerai faire que si detection avec "MOTION_ESCALIER" et seulement si la Valeur Lux > 260 "DETECTEUR_LUX_ESCALIER" que la lumiere s'allume. Je nage un peu la.

     

    Quelqu'un peut m'aider?

     

     

×
×
  • Créer...