Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,


as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.


As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!



Smart Home Forum by FIBARO Team

Search the Community

Showing results for tags 'scene'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • FIBARO Community
    • FIBARO Portal and Forum policy
    • FIBARO
    • Say hello!
    • Off-topics
  • FIBARO Update
    • FIBARO System Update
    • FIBARO Mobile Update
  • FIBARO Community Support
    • Scenes and Interface
    • FIBARO Products
    • FIBARO Mobile
    • FIBARO HomeKit
    • FIBARO Assistant Integrations
    • Other Devices / Third-party devices
    • Tutorials and Guides
    • Home Automation
    • Suggestions
  • FIBARO Społeczność
    • FIBARO
    • Przywitaj się!
    • Off-topic
  • FIBARO Aktualizacja
    • FIBARO System Aktualizacja
    • FIBARO Mobile Aktualizacja
  • FIBARO Wsparcie Społeczności
    • Sceny i Interfejs
    • FIBARO Urządzenia
    • FIBARO Mobilnie
    • FIBARO HomeKit
    • Integracja z Amazon Alexa i Google Home
    • Urządzenia Firm Trzecich
    • Poradniki
    • Automatyka Domowa
    • Sugestie


  • Scenes
  • Virtual Devices
  • Quick Apps
  • Icons

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start






Website URL





  1. Hi, I would like to use the wake on lan plugin in my scene, but it doesn´t show for block scenes so I guess it is only available for LUA. But I have no idea how to use it in LUA. Can someone help? Regards, Jens
  2. When i installed a dimmer2 and connected it to mij hc2 it created a set of devices. One is de dimmer to put on of or control light power One is a remote switch. How can i use this? I see 4 numbered events where i can activate scenes. The manual is verry verry basic and does not tell the full operation and nothing about programming on hc2. What i understand is: push puls switch once: lights on to previus power strength push puls switch again once: lights out Pusch puls switch two times : lights to maximum How can ik regulate light strength with the puls switch? Or is this not posible? Then programming. Can i read puls switch events to scenes? Is this done bij de remote switch device? What is event 12,13,14 and 16? Can ik opperate de dimmer bij programming and ignore puls switch actions ( i want to use the puls switch actions in custom scenes). A lot of questions. I hope there will be some answers. Thanks for that.
  3. Helle Everyone, hope someone can help me out here. I have this simple scene below running to turn on and off the lights in a room (off after 15 minutes) It works perfect, however, problems start when turning the light off with the physical light switch (pulse) If I do that, the light goes out (of course) but this scene keeps running and won't turn on the light if I enter the room again in 5 minutes. Ideal situation (in my opinion) , to kill this scene when the light is switched of but I have no success yet.... hope someone can help me with that. Greeting, Vincent. --[[ %% autostart %% properties 505 value %% weather %% events %% globals --]] if (fibaro:countScenes()>1) then fibaro:abort() end -- Run only one scene local light_1 = 513 -- ID Lamp 1 --local light_2 = 78 -- ID lamp 2 local sensor_1 = 505 -- Mov. sensor 1 --local sensor_2 = 86 -- Mov. sensor 2 local timer = 15 -- Timer in minutes local counter = timer local counter = timer if (tonumber(fibaro:getValue(sensor_1, "value")) > 0 ) then fibaro:debug("Turn on lights") --fibaro:call(light_1, "turnOn"--) fibaro:call(light_1, "turnOn") --fibaro:call(light_2, "turnOn") while counter > 0 do counter = counter -1 fibaro:sleep(60*1000) fibaro:debug("Counter = ".. counter) if tonumber(fibaro:getValue(sensor_1, "value")) > 0 --or tonumber(fibaro:getValue(sensor_2, "value")) > 0 then counter = timer end end fibaro:debug("Turn off lights") fibaro:call(light_1, "turnOff") --fibaro:call(light_2, "turnOff")-- end
  4. Hi there, Does anyone have a simple scene for the following: Exhaust Fan can be controlled (and overridden) buy press button. On/Off If exhaust fan is running for more than 10min, turn off.. Cheers
  5. Currently I've some basic scenes when light X is on then light Y must be on, but now I want to create an scene when light X is on 20% dimming value then light Y should be one with the same dimming value. When I try to create an block scene I can't find anything to create this scene, and my knowledge with LUA scripting is too less to create this. Can anybody give me the right direction here.
  6. Hi, Is it possible to interrupt a scene when a button is pushed? Either to interrupt it or launch another scene. I already have remote control with 4 buttons but I'd like to also buy an emergency button that would terminate the scene that is running. Could you please give me a hand with this or refer me to any other open topic related to this? Thanks a lot! Raul.
  7. How to change ones colour in a wallplug? When the wallplug is off, its white at the moment. (being set in parameter 42 > option 3) But I would like to have the white light only be on after a certain time in the evening and sunrise How to I start with this scene?
  8. I understand that the plugin in HC2 is only to enable manual control of lights from the HC2 and from the Fibaro App. Are there any other ways I could include one or more hue lights into scenes? Any coding? Anything else before I have to throw a large investment I made in hue lights or instead the Fibaro one? Many thanks for your support.
  9. Hi I want to build a conditional scene as follows: If daypart ="state" (Ex: Evening) and main light at a specific room are on for more than defined time (ex: >=30sec) then turn other lights\devices on appreciate your support Ran
  10. Is there also a Scene error checker available on this forum?
  11. Hi everyone, It appears my hue lights are not responding to any scenes after the HC2 and hue hub had a power outage. is there an easy way to reset this? I dont want to create new bulbs with new device ID's because then i will ave to change all my scenes Thanks in advance!
  12. Hi, can some help to tell me how it works with the scene sent function? I'd like to do: with one click to start a 1st function with two clicks to start a 2nd function But it comes out that the response of the switch looks like its random if it detects one or two clicks. I played with the parameters but I can't see any better. Is it at all possible to have two functions?
  13. I want to trigger a scene whenever the global variable change value. The values of the global variable are are "0" or "1" . The test scene is : --[[ %% properties %% weather %% events %% globals GlobalVariable --]] if ( fibaro:getGlobalValue("GlobalVariable") == "1" ) then fibaro:debug("Variable is 1"); end if ( fibaro:getGlobalValue("GlobalVariable") == "0" ) then fibaro:debug("Variable is 0"); end The scene is not activated automatically by change of the global variable "GlobalVariable". If I run scene manually it reports correctly the value of the global variable. Any hint ... ?
  14. Hello! I am new to to Lua coding and coding generally, and i am struggeling to be satisfied with my bathroom fan control during shower. Devices: Netatmo Indoor and outside module and Fibaro Relay Per now, I control my bathroom fan, by monitoring the humidity in the room and set the fan to start at a given level like below. This is made by normal scene blocks. (If OUTSIDE humidity > 90 AND INDOOR humidity >= 60 = "Turn on") (If OUTSIDE humidity > 90 AND INDOOR humidity < 60 = "Turn off") (If OUTSIDE humidity < 90 AND INDOOR humidity >= 55 = "Turn on") (If OUTSIDE humidity < 90 AND INDOOR humidity <55 = "Turn off") The outside criteria "helps" on wet and rainy days, by not letting the fan start on its own due to rise in humidity. Due to the fact that outside humidity plays a HUGE role on the inside humidity, my setup must be modified all the time because of seasonal changes. What i would really want is a script that does the following using only the inside humidity and the relay: The plugin for Netatmo pulls information every minute, but the Netatmo itself only uploads to the API site every 10 min. Så when i get a rise in humidity, i allways get atleast 5% at a time. That means the Fibaro thinks it gets 5% rise in one minute (if i think at this correctly) I want a sudden rise in humidity, regardless of the outside OR the inside humidity, to trigger the fan. (Example: from 25-->30, 45-->50, 52--57) The thing i think is tricky, is that you actualy must "save" the previus value and compare it to the new?!? If i get the fan to trigg this way, i could easily set up another scene to stop the fan after an hour. BUT, it would be much more awsome if the fan stayed on until the humidity value BEFORE the spike was reached. Does anybody have a solution for this? I know the guy at the top of this topic, providing the link, has made this in Domoticz - https://www.domoticz.com/forum/viewtopic.php?t=4421 Sorry for my horrible english writing! Best regards
  15. Hi all, I run into a problem with a scene behind a button in a VD I m using to set my living room lights at a certain dim level. I have many buttons each with a different setting of the lights. The problem is i need to run the scene three times to get the lights set at the correct dim level. In the screenshot below the debug of the thee times i ran the scene are shown. To start, I manually set the lights at 100% and then turned them all off. How can i solve this? Note: I use a MCO Home control pad to manually turn on the light. There is a scene that sets the dim level at 75% when the light is switched on manually. I use the Global SceneStart to determine whether the mco home button is switched on manually or by this scene. Please find my scene here: --[[ %% properties %% events %% globals --]] local DimSchuipui local DimKeuken local DimBank1 local DimBank2 local DimBank3 local DimEntree fibaro:setGlobal('SceneStart', 1); fibaro:call(22, "turnOff"); --Schakelaar Schuifpui --fibaro:call(26, "setValue", "10") --Zet Schuifpui op 10% fibaro:call(21, "turnOn"); --Schakelaar Keuken fibaro:call(28, "setValue", "25") --Zet Keuken op 25% fibaro:call(100, "turnOff"); --fibaro:call(100, "setValue", "10") --Zet Bank1 op 10% fibaro:call(102, "turnOff"); --fibaro:call(102, "setValue", "10") --Zet Bank2 op 10% fibaro:call(106, "turnOn"); fibaro:call(106, "setValue", "10") --Zet Bank3 op 10% fibaro:call(24, "turnOn"); --Schakelaar Bank fibaro:call(94, "turnOff"); --Schakelaar Entree --fibaro:call(64, "setValue", "25") --Zet Entree op 25% DimSchuifpui = fibaro:getValue (26, "value") DimKeuken = fibaro:getValue (28, "value") DimBank1 = fibaro:getValue (100, "value") DimBank2 = fibaro:getValue (102, "value") DimBank3 = fibaro:getValue (106, "value") DimEntree = fibaro:getValue (64, "value") fibaro:debug( 'Schuifpui staat nu op = ' .. DimSchuifpui) fibaro:debug( 'Keuken staat nu op = ' .. DimKeuken) fibaro:debug( 'Bank1 staat nu op = ' .. DimBank1) fibaro:debug( 'Bank2 staat nu op = ' .. DimBank2) fibaro:debug( 'Bank3 staat nu op = ' .. DimBank3) fibaro:debug( 'Entree staat nu op = ' .. DimEntree) fibaro:setGlobal('SceneStart', 2)
  16. amatt

    Guest presence

    Has anyone been able to create a functioning Guest "mode"? I was thinking about making my guest mode do something like the following but is not functioning correctly. everytime a guest is present add 1 to the "guests" variable then everytime a guest is not present minus 1 from the "guests" variable I already have the presence setup with a VD that finds the guests phone via Mac address. the problem is that when it detects that the guest is present it adds 1 to the variable everytime it finds the guests phone (I have it looking every 30min) has anyone found a better solution or can give some advise on how to keep a more accurate track of how many guests are present. Thanks!
  17. HI all, Is there a way to disable a scene (which is triggered by a change in value) from another scene. Situation: I have a simple scene that sets the light at 75% when i change the value of another device (mco home touch pad). Now I want to create another scene that sets the light at say 25%. However, i do need to change de value of the mco home because otherwise the light has no power (the mco home is also a non z-wave device). How could I prefend the first scene from putting the light at 75% and running only the second scene? Hope you could help. Ciao Figlio
  18. Why do I get push notifications during the day if the garage door opens with this block scene? (attached screenshot). The sensor is a Vision tilt sensor.. Converted to LUA it looks like this: --[[ %% autostart %% properties 250 value %% weather %% events %% globals --]] local sourceTrigger = fibaro:getSourceTrigger(); function tempFunc() local currentDate = os.date("*t"); local startSource = fibaro:getSourceTrigger(); if ( ( ((currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7) and string.format("%02d", currentDate.hour) .. ":" .. string.format("%02d", currentDate.min) == "22:30") ) and ( tonumber(fibaro:getValue(250, "value")) > 0 ) ) then fibaro:call(55, "sendDefinedPushNotification", "247"); end setTimeout(tempFunc, 60*1000) end if (sourceTrigger["type"] == "autostart") then tempFunc() else local currentDate = os.date("*t"); local startSource = fibaro:getSourceTrigger(); if ( ( (currentDate.wday == 1 or currentDate.wday == 2 or currentDate.wday == 3 or currentDate.wday == 4 or currentDate.wday == 5 or currentDate.wday == 6 or currentDate.wday == 7) ) and ( tonumber(fibaro:getValue(250, "value")) > 0 ) or startSource["type"] == "other" ) then fibaro:call(55, "sendDefinedPushNotification", "247"); end end Guess I would be better off if I could make anything out of this LUA code... :-/ //JR
  19. Hi, When editing a scene in lua the screen is very small. So I got this script to add a fullscreen button to make it easier to read en edit my lua, you paste the code in my Developer Console and hit enter. But of course after a refresh the button is gone. var sheet = document.styleSheets[0]; sheet.insertRule(".CodeMirror-fullscreen { position: fixed !important; top: 31px; left: 0; right: 0; bottom: 0; height: auto !important; z-index: 9; }", 1); CodeMirror.defineOption("fullScreen", false, function (cm, val, old) { if (old == CodeMirror.Init) old = false; if (!old == !val) return; if (val) setFullscreen(cm); else setNormal(cm); }); function setFullscreen(cm) { var wrap = cm.getWrapperElement(); cm.state.fullScreenRestore = { scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset, width: wrap.style.width, height: wrap.style.height }; wrap.style.width = ""; wrap.style.height = "auto"; wrap.className += " CodeMirror-fullscreen"; document.documentElement.style.overflow = "hidden"; cm.refresh(); } function setNormal(cm) { var wrap = cm.getWrapperElement(); wrap.className = wrap.className.replace(/\s*CodeMirror-fullscreen\b/, ""); document.documentElement.style.overflow = ""; var info = cm.state.fullScreenRestore; wrap.style.width = info.width; wrap.style.height = info.height; window.scrollTo(info.scrollLeft, info.scrollTop); cm.refresh(); } jQuery('body').append(jQuery('<div/>', { html: "Fullscreen", "class": "Button1_1", "style": " position: absolute; right: 10px; bottom: 10px; z-index: 10;", click: function () { editor.setOption("fullScreen", !editor.getOption("fullScreen")); } })) Can you add the fullscreen add-on from CodeMirror to the editor (https://codemirror.net/doc/manual.html#addon_fullscreen)? I needed to add a button in stead of using the F11 because it wasn't working on my MacBook. Kind regards, Giedo
  20. hi, I made this VD a while ago. It makes a weekly report of the HC2 and works pretty good but I want to move in to a scene. I used Net.FHttp and this doesnt work in scenes. Can somebody help? Regards Martijn --- UPDATE MEMORY VARIABLES fibaro:call(fibaro:getSelfId(), "pressButton", "8") --- MAKE CONNECTION connection = Net.FHttp("", 11111); --- FUNCTION REQUEST DEVICES getData = function() --- MAKE CONNECTION response ,status, errorCode = connection:GET( "/api/devices/" ); --- STATUS NOTIFICATIONS fibaro:debug("status = " .. status); fibaro:debug("errorCode = " .. errorCode); --- IF SUCCES if (tonumber(status) == 200) then --- DECODE TO LUA TABLE deviceTable = json.decode(response); end return deviceTable; end --- FUNCTION REQUEST CONSUMPTION getConsumption = function(url) --- MAKE CONNECTION response ,status, errorCode = connection:GET( url ); --- IF SUCCES if (tonumber(status) == 200) then consumptionTable = json.decode(response); end return consumptionTable; end --- CONSTRUCT SUBSTRACTION DAYS START DATE OF LAST WEEK if(os.date("%a") == "Mon") then substract = 7 elseif(os.date("%a") == "Tue") then substract = 8 elseif(os.date("%a") == "Wed") then substract = 9 elseif(os.date("%a") == "Thu") then substract = 10 elseif(os.date("%a") == "Fri") then substract = 11 elseif(os.date("%a") == "Sat") then substract = 12 elseif(os.date("%a") == "Sun") then substract = 13 end --- SET VARIABLES UserId = 2; lowBat = 70; SelfId = fibaro:getSelfId() dev = getData(); lowBattDevices = ""; deadDevices = ""; totalConsumption= 0 ; heavyConsumption= ""; now = os.date("*t") week_start = os.time({year=now.year,month=now.month,day=now.day-substract,hour=0,min=0,sec=0}) --, week_end = week_start + 604799 -- plus a week --- LOOP THROUGH DEVICES for i = 1, #dev do --- SET VARS batLevel = tonumber(dev.properties.batteryLevel); deadValue = dev.properties.dead; deviceName = tostring(dev.name); prestr = "[" .. dev.id .. "] ➜ " .. deviceName; --- DEAD DEVICES if(dev.visible == true and deadValue == "true") then --- TRY TO WAKE fibaro:wakeUpDeadDevice(dev.id) fibaro:sleep(2*1000); --- CHECK IF STILL DEAD if(fibaro:getValue(dev.id, 'dead') ~= "1") then deadDevices = deadDevices .. prestr .. " ✔ Woke up \n"; else deadDevices = deadDevices .. prestr .. " ❌ Did not wake up \n"; end end --- LOW BATT / IF FIELD EXISTS if (dev.visible == true and dev.properties.batteryLevel ~= nil and (batLevel < 100 or batLevel == 255)) then --- ONLY LOW BAT OF ALLREADYDEAD if(deadValue == "true" or batLevel <= lowBat or (deadValue ~= "true" and batLevel == 255)) then -- lowBattDevices = lowBattDevices .. prestr .. " - " .. string.format('<%s style="color:%s;">%s</%s>', "span", "red", dev.properties.batteryLevel .. " %", "span") .. "<br>\n" lowBattDevices = lowBattDevices .. prestr .. " - " .. dev.properties.batteryLevel .. "% ❌ \n" else lowBattDevices = lowBattDevices .. prestr .. " - " .. dev.properties.batteryLevel .. "% ✔ \n" end end --- CONSUMPTION if (dev.visible == true) then --- SET VARS url = "/api/energy/" .. week_start .."/" .. week_end .. "/compare/devices/power/" .. dev.id Consumption = getConsumption(url); --- ONLY IF THERE IS A KWH FIELD if(Consumption[1].kWh ~= nil) then --- SET VARS kwh = tonumber(Consumption[1].kWh) --- HEAVY USERS LOOP if kwh > 1 then heavyConsumption = heavyConsumption .. prestr .. " ⚡ " .. Consumption[1].kWh .. " kWh \r"; end --- TOTAL CONSUMPTION SUM totalConsumption = tonumber(totalConsumption) + kwh end end end --- CONSTRUCT MAIL HOME REPORT emailContent = "Weekly Home Report \n"; emailContent = emailContent .. "Date: " .. os.date("%d %b %Y - %H:%M") .. "\n \n"; emailContent = emailContent .. "⎋ Low Battery\r"; emailContent = emailContent .. lowBattDevices .. "\r \r"; emailContent = emailContent .. "⎋ Dead Nodes\n"; emailContent = emailContent .. deadDevices .. "\n \n"; --- SEND MAIL fibaro:call(UserId,"sendEmail", "Weekly Home Report " .. os.date("%d %b %Y - %H:%M"),emailContent); --- CONSTRUCT MAIL CONSUMPTION REPORT emailContentConsumption = "Weekly Consumption Report \n"; emailContentConsumption = emailContentConsumption .. "Date: " .. os.date("%d %b %Y - %H:%M") .. "\n \n"; emailContentConsumption = emailContentConsumption .. "⌘ Consumption\n"; emailContentConsumption = emailContentConsumption .. "From: " .. os.date("%d %b %Y",week_start) .. " till " .. os.date("%d %b %Y",week_end) .. "\n \n"; emailContentConsumption = emailContentConsumption .. "Heavy consumption \n"; emailContentConsumption = emailContentConsumption .. heavyConsumption .. "\n\n"; emailContentConsumption = emailContentConsumption .. "Consumption total\n"; emailContentConsumption = emailContentConsumption .. totalConsumption .. " kWh \n\n"; --- SEND MAIL fibaro:call(UserId,"sendEmail", "Weekly Consumption Report " .. os.date("%d %b %Y - %H:%M"),emailContentConsumption); --- CONSTRUCT MAIL CONSUMPTION REPORT emailContentMemory = "Weekly Memory Report \n"; emailContentMemory = emailContentMemory .. "Date: " .. os.date("%d %b %Y - %H:%M") .. "\n \n"; emailContentMemory = emailContentMemory .. "⌽ Memory\n"; emailContentMemory = emailContentMemory .. "➜ Free memory: " ..fibaro:getValue(SelfId, "ui.labFreeRam.value") .. "\n"; emailContentMemory = emailContentMemory .. "➜ Maximum free: " ..fibaro:getValue(SelfId, "ui.labMax.value") .. "\n"; emailContentMemory = emailContentMemory .. "➜ Minimum free: " ..fibaro:getValue(SelfId, "ui.labMini.value") .. "\n"; emailContentMemory = emailContentMemory .. "➜ Memory Cache: " ..fibaro:getValue(SelfId, "ui.labCache.value") .. "\n"; emailContentMemory = emailContentMemory .. "➜ Memory Buffers: " ..fibaro:getValue(SelfId, "ui.labBuffers.value") .. "\n"; emailContentMemory = emailContentMemory .. "➜ Memory Used: " ..fibaro:getValue(SelfId, "ui.labUsed.value") .. "\n"; emailContentMemory = emailContentMemory .. "➜ Storage: " ..fibaro:getValue(SelfId, "ui.labStorage.value") .. "\n"; --- SEND MAIL fibaro:call(UserId,"sendEmail", "Weekly Memory Report " .. os.date("%d %b %Y - %H:%M"),emailContentMemory);
  21. Hi, I currently use the script (Scene) below to turn off all lights when going to sleep. The problem is sometimes my adult children are still awake upstairs. How would I modify scene to turn off only downstairs lights? HC2 - Running latest version I thought of using the description field in devices and evaluating but can't work out the code. Help! --[[ %% properties %% events %% globals --]] local ids = fibaro:getDevicesId( { interfaces = { "light", }, properties = { dead = false, }, enabled = true, visible = true, -- optional --userDescription ~= "", -- attempt to evaluate if user description in device is not nil. } ); -- loop through light ids for i, id in ipairs(ids) do fibaro:debug("Turning off " .. fibaro:getName(id)); -- turn light off fibaro:call(id, "turnOff"); end Thanks Jason
  22. Hi, I had the requirement for a very simple scheduler. The code below is a stripped down version of @Sankotronic Main Scene code and just contains the Scene Scheduler. Thanks to @Sankotronic for his permission to post this. -- SIMPLE SCHEDULER. -- STRIPPED DOWN VERSION OF 'MAIN SCENE' CODE BY SANKOTRONIC --[[ %% autostart %% properties %% globals --]] if (fibaro:countScenes() > 1) then fibaro:abort(); end local jT = json.decode(fibaro:getGlobalValue("HomeTable")); -- comment out if you don't use a hometable local currenttime = os.date('*t'); local currentwday = currenttime['wday']; local TimeCurrent = os.date("%H:%M", os.time()); -- SCHEDULED SCENES SETUP -- (seperate multiple entries by comma) local runSceneSchedName = {"Test Scene 1", "Test Scene 2"}; -- Add scene names local runSceneSchedID = {641, jT.scene.Wakeup}; -- add scene ID's or references local runSceneSchedHour = {{"21:47"}, {"07:30"}}; -- Add times to run the scenes local runSceneSchedWeek = {{1, 1, 1, 1, 1, 1, 1}, {1, 1, 1, 1, 1, 1, 1}}; -- specify what day to run the scenes, Sunday is first day in array function doSceneSched() if #runSceneSchedID > 0 then for i = 1, #runSceneSchedID do if runSceneSchedWeek[i][currentwday] == 1 then for t = 1, #runSceneSchedHour[i] do if runSceneSchedHour[i][t] == TimeCurrent then fibaro:startScene(runSceneSchedID[i]); end end end end end end -- MAIN LOOP while true do currenttime = os.date('*t'); currentwday = currenttime['wday']; TimeCurrent = os.date("%H:%M", os.time()); doSceneSched(); fibaro:sleep(59700); end The full Main Scene code can be found at https://forum.fibaro.com/index.php?/topic/23510-scene-main-scene-for-time-based-events-control-v-125/ I thought this many be useful for some new users starting out or those like me that need a simple yet well written scheduler and may even be a stepping stone for some to the full Main Scene. -f
  23. I have a Sonos:AMP in my bathroom which I was not using that much because when I go into the bath or shower my phone often isn’t around to turn on the music. So, It seemed handy to turn on the music (the existing playlist) with a triple click of my bathroom light switch. This is how I reached this goal: I installed the Sonos Plugin and I added my bathroom Sonos device I downloaded and added the Sonos Virtual Device from Krikroff: http://www.fibarouk.co.uk/resources/VirtualDevices/SonosPlayer-0.0.8.zip Add a variable in the Variables Panel. I used this tutorial on Youtube: https://www.youtube.com/watch?v=ps9jNiJ_JeU As I am still using Dimmer 1 (FGD-211), I turned on the Scene Activation functionality by putting parameter 41 on 1 in the advanced tab of my bathroom dimmer. If you use Dimmer 2 (FGD-212) you’ll have to put parameter 28 on 1 (no experience, so not sure). After that I build 3 scenes: First of all a scene to put on the Sonos on a specific volume level (where as 311 and 312 are the ID’s of the Sonos Plugin and Virtual Device): --[[ %% properties %% events %% globals --]] -- Set volume of the Sonos plugin fibaro:call(311, "setVolume", "40") -- Press button 7 (play) of the Sonos Virtual Device fibaro:call(312, "pressButton", "7") Second a scene to stop the Sonos player again: --[[ %% properties %% events %% globals --]] -- Press button 9 (stop) of the Sonos Virtual Device fibaro:call(312, "pressButton", “9") Third, a scene to activate the scenes on a triple click: --[[ %% properties 12 sceneActivation %% globals --]] local id= 12; -- Change this to your dimmer ID if (tonumber(fibaro:getValue(id, "sceneActivation"))==15) and (tonumber(fibaro:getValue(id,"value"))==0) then fibaro:debug("3click activated, Sonos bathroom ON"); fibaro:setGlobal("Sleep", "1") -- Change this to your sleep variable(if you have one) fibaro:startScene(278); -- or start a second scene end if (tonumber(fibaro:getValue(id, "sceneActivation"))==15) and (tonumber(fibaro:getValue(id,"value"))>0) then fibaro:debug("3click activated, Sonos bathroom OFF"); fibaro:setGlobal("Sleep", "1") -- Change this to your sleep variable(if you have one) fibaro:startScene(279); -- or start a second scene end 12 is the dimmer ID of the bathroom, 278 the ID of the scene to turn on Sonos and 279 to turn off Sonos. 15 corresponds with triple click. There is one issue I didn’t foresee (because I copied scene 3): scene 3 looks if dimmer 12 is on (>0) or off (=0) to decide whether to turn on or off the Sonos. This should obviously be: look whether the music is on or off to decide if it has to be turned on or off. Somebody any suggestions to solve this? Any other suggestions to develop this solution further are welcome as well. Thanks in advance. Wesselvvvb
  24. Hello, I like to start a scene at every keypress on my Zipato Mini Keypad with RFiD Example: Zipato Away + PIN >>> Start scene Arm Zipato Home + TAG >>> Start scene DisArm Zipato Away + TAG >>> Start scene Arm Zipato Home + PIN >>> Start scene DisArm This works fine, no problem so far but if i'm also using my smartphone it doesn't work 1) Yesterday Alarm Disarmed by Zipato-Home-key + PIN 2) Today Alarm Armed by Smartphone 3) Today i try to disarm by Zipato-Home-key + TAG >>> NO TRIGGER Fibaro HC2 doesn't start a scene at step-3 because 'value' was not changed, for the system i pushed the home-key again (step 1 and 3) How do i trigger a scene with FIBARO LUA every time a key was pushed? ----------------------- Every key-press is send to Fibaro HC2 as it shows in the status screen [23:11:56] ID 299: locked by user 2 [23:24:50] ID 299: unlocked by user 2 [23:24:58] ID 299: locked by user 2 [23:25:25] ID 299: locked by user 2 [23:25:43] ID 299: locked by user 2 [23:25:54] ID 299: unlocked by user 2 [23:27:46] ID 299: locked by user 2 [23:27:52] ID 299: locked by user 3 [23:27:57] ID 299: unlocked by user 2 [23:31:03] ID 299: locked by user 2 [23:31:13] ID 299: unlocked by user 2 [23:47:04] ID 299: locked by user 1 [23:47:11] ID 299: unlocked by user 1 ----------------------- SCENE HEADER: --[[ %% properties 299 value %% events %% globals --]] Can somebody help?
  25. Hi, Is it possible to start a scene through an http command with specific attributes? e.g. /api/SceneControl?action=start&id=sceneID&var1=5 Or should I change a global variable using /api/globalVariables first? I feel I will then get in trouble when multiple instances of a scene are ran simultaneously. Thanks, J
  • Create New...