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!

 

Regards,

Smart Home Forum by FIBARO Team


Search the Community

Showing results for tags 'Scenes'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Categories

  • Scenes
  • Virtual Devices
  • Quick Apps
  • Icons

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Facebook


Google+


Skype


Website URL


WhatsApp


Country


Gateway/s


Interests

  1. Good evening. Please let me know if there is a possibility for the Home Center Lite equipment to make a scene so that when the front door opens a room will send me a photo of who entered or left the house. I mention that at HC2 and HC3 I created this scene and it works. At HCL, even if there is a correctly configured and functional camera in the device, my camera does not appear in the scenarios when I want to configure when opening the door to send a photo by mail. May? how come? Thanks
  2. Hello seniors and comrades, i have a virtual device for iEast stream pro and i would like to Use the Playlist Function buttons to play Music in my Scenes but i have no idea how to do it. i don't know how to make and add music in the playlists. i can only play through USB Button function. i have tried searches but nothing, and this forum is my only hope i got. Lua Code in the Playlists: -- Play Preset #1 local command = "/httpapi.asp?command=MCUKeyShortClick:1"; local selfId = fibaro:getSelfId(); local ip = fibaro:get(selfId, 'IPAddress'); local port = fibaro:get(selfId, 'TCPPort'); local connection = Net.FHttp(ip, port); connection:GET(command) fibaro:call(selfId, "setProperty", "ui.labelState.value", "[preset 1]"); See the attached is my VD for iEast Stream Pro Looking forward for your kindness and help. Thank you all.
  3. Hello, I have been trying different ways of writing the following scene and each method I have tried doesn't work the way I want. What I want is - If it is 21:30 and Chicken Coop Light is On Then Send push notification. Seems simple but in the above format every time the light is turned on regardless of time, the notification is sent. If I reverse the trigger so that If Light is on and time is 21:30 I will get the notification everyday at 21:30 regardless of whether the light is on or off I've tried splitting the scene over two scenes, Scene 1 would be 'At 21:30 run scene 2' Scene 2 would be 'If light on then send notification' and I get the notification everyday at 21:30 regardless of time. Any suggestions? Thanks
  4. Hello, I'm trying to "convert" this LUA script in a scene, but my trouble cames from the fact that I don't know how to send an http request in a scene. Here is the script I use in a device (and it works find): local texte = string.format("%s %s", tostring(os.date('%H:%m', os.time() )), "HC3 : This is a test.") local address = string.format("http://192.168.0.0/write?color=%s&bg=%s&t=%s", "black", "white",texte) http:request(address, { options={ method = 'GET' }, success = function(response) print(response.data) end, error = function(error) self:debug('error: ' .. json.encode(error)) end }) The goal, is to send a time stamped notification in a remote web server when a scene is launch, but maybe I'm on a wrong way ? Thanks for your help. Alex.
  5. Hi All, Please guide me to right way to get args in scene on HC3 HC2 code to get scene args was: local args = fibaro:args() on HC3 it not working now Tried: local args = fibaro.args() -> got error: attempt to call a nil value (field 'args') local args = fibaro:args(). -> got error: attempt to call a nil value (method 'args') LUA editor don't show any functions containing "args".... Help, please... Thanks
  6. My apologies if this is already described, I did search, honest! I've added an Aeotec WallMote Quad to my HC3 and configured the buttons, now I'm adding a second one to the far side of the same room, so want some of the buttons to perform the same functions. How do I link a button to an existing scene? When I try to add a function to a button (Under Devices, [The remote in question], Advanced) the only option seems to be to create a new scene. Many thanks in advance!
  7. It looks like I can set up a scene to react to events. How can I tell what events a particular ZWave device sends that I can wire a scene to? (How are these different from changes of property value?)
  8. cag014

    All about icons

    Version 3.1

    12,614 downloads

    Did some rework on Fibaro and Aeon sensors icons and few others The stand alone sensor icon actually has a little human figure stand still (white color) to use as part of inactive motion icon. Added linear icons
  9. Version 1.0.0

    1,407 downloads

    More then 300 scene icons
  10. While working from home for eight months now I had the need to toggle a light or run a scene from my Windows 10 laptop. After some Google I didn't find an app so I decided to learn basic C# and create a Windows tray application myself. The application loads your configured rooms, devices and scenes from your HC2/HC3 and puts them in a menu in the system tray. Now you can run a scene or toggle a light switch without reaching for a wall switch or your phone. ? The program looks like this: I Iearn and get a lot from the Fibaro community, therefore I made the code open source on GitHub. You can download the application from the releases page. You only need the .exe file. I don't own a HC3. If it also works on the HC3 please inform me. Than I add it to the documentation.
  11. Hi, I've just got my HCL and installed the Hue plugin. I see all lights - and I am able to control them - on the main device page, though when I try to make a new scene (from blocks) the lights are not included in the device list? Please find images attached. Q: How do I get them to show up, within the scene builder?
  12. Hi all, I'm trying to build several alarm scenes using the graphical block builder (will be switching to LUA soon). Part of what I want to do is to receive Push Notifications on my mobile device (Android phone) but when I try to select my registered mobile device under the Notifications menu, nothing is listed. I've checked that my phone is listed under Configuration > Access Control and can see it listed there under Mobile Device List, with a tick in the checkbox to receive notifications I should add, that if I create a scene that is triggered by the GPS location of a mobile device, then my phone IS recognized there..... Any ideas?
  13. As has been re-iterated many many times on this forum, there are two methods of updating a slider in a virtual device from a scene or another VD: Using fibaro:call(device, "setProperty", "ui.sliderX,value", value) causes the numerical value of the slider to be updated, but not the length of the slider bar. Neither does it execute the code behind the slider. Using fibaro:call(device, "setSlider", X, value) causes the numerical value and the length of the slider to be updated,, and executes the code behind the slider. In both cases, "device" is the ID number of the VD, "X" is the slider reverence number and "value" is the new slider value (0-100). Generall, option 2 is preferred because everything is updated. However, there seems to be an issue if the VD has more that nine sliders. Executing a few lines of test code for each of the methods illustrates this. First, method 1. Executing this code: local device = fibaro:getSelfId() local sliderString1 local sliderString2 local numSliders = 13 fibaro:debug('-----------------------------------------------------------') fibaro:debug('--Set Sliders----------------------------------------------') for i = 1, numSliders do sliderString1 = ('ui.Slider' .. tostring(i) .. '.value') fibaro:call(device, "setProperty", sliderString1, tostring(i)) fibaro:debug('Slider ' .. tostring(i) .. ' = ' .. tostring(i)) end fibaro:debug('--Read Sliders---------------------------------------------') for i = 1, numSliders do sliderString1 = ('ui.Slider' .. tostring(i) .. '.value') sliderString2 = fibaro:getValue(device, sliderString1) fibaro:debug(device .. ', ' .. sliderString1 .. ' = ' .. sliderString2) end Gives: [DEBUG] 16:21:04: --Set Sliders---------------------------------------------- [DEBUG] 16:21:04: Slider 1 = 1 [DEBUG] 16:21:05: Slider 2 = 2 [DEBUG] 16:21:05: Slider 3 = 3 [DEBUG] 16:21:05: Slider 4 = 4 [DEBUG] 16:21:05: Slider 5 = 5 [DEBUG] 16:21:05: Slider 6 = 6 [DEBUG] 16:21:05: Slider 7 = 7 [DEBUG] 16:21:05: Slider 8 = 8 [DEBUG] 16:21:05: Slider 9 = 9 [DEBUG] 16:21:05: Slider 10 = 10 [DEBUG] 16:21:05: Slider 11 = 11 [DEBUG] 16:21:05: Slider 12 = 12 [DEBUG] 16:21:05: Slider 13 = 13 [DEBUG] 16:21:05: --Read Sliders--------------------------------------------- [DEBUG] 16:21:05: 1044, ui.Slider1.value = 1 [DEBUG] 16:21:05: 1044, ui.Slider2.value = 2 [DEBUG] 16:21:05: 1044, ui.Slider3.value = 3 [DEBUG] 16:21:05: 1044, ui.Slider4.value = 4 [DEBUG] 16:21:05: 1044, ui.Slider5.value = 5 [DEBUG] 16:21:05: 1044, ui.Slider6.value = 6 [DEBUG] 16:21:05: 1044, ui.Slider7.value = 7 [DEBUG] 16:21:05: 1044, ui.Slider8.value = 8 [DEBUG] 16:21:05: 1044, ui.Slider9.value = 9 [DEBUG] 16:21:05: 1044, ui.Slider10.value = 10 [DEBUG] 16:21:05: 1044, ui.Slider11.value = 11 [DEBUG] 16:21:05: 1044, ui.Slider12.value = 12 [DEBUG] 16:21:05: 1044, ui.Slider13.value = 13 As would be expected. However executing a code snippet using method 2, like this: local device = fibaro:getSelfId() local sliderString1 local sliderString2 local numSliders = 13 fibaro:debug('-----------------------------------------------------------') fibaro:debug('--Set Sliders----------------------------------------------') for i = 1, numSliders do fibaro:call(device, "setSlider", tostring(i), tostring(i)) fibaro:debug('Slider ' .. tostring(i) .. ' = ' .. tostring(i)) end fibaro:debug('--Read Sliders---------------------------------------------') for i = 1, numSliders do sliderString1 = ('ui.Slider' .. tostring(i) .. '.value') sliderString2 = fibaro:getValue(device, sliderString1) fibaro:debug(device .. ', ' .. sliderString1 .. ' = ' .. sliderString2) end Give this: [DEBUG] 16:43:02: --Set Sliders---------------------------------------------- [DEBUG] 16:43:02: Slider 1 = 1 [DEBUG] 16:43:02: Slider 2 = 2 [DEBUG] 16:43:02: Slider 3 = 3 [DEBUG] 16:43:02: Slider 4 = 4 [DEBUG] 16:43:02: Slider 5 = 5 [DEBUG] 16:43:02: Slider 6 = 6 [DEBUG] 16:43:02: Slider 7 = 7 [DEBUG] 16:43:02: Slider 8 = 8 [DEBUG] 16:43:02: Slider 9 = 9 [DEBUG] 16:43:03: Slider 10 = 10 [DEBUG] 16:43:03: Slider 11 = 11 [DEBUG] 16:43:04: Slider 12 = 12 [DEBUG] 16:43:04: Slider 13 = 13 [DEBUG] 16:43:04: --Read Sliders--------------------------------------------- [DEBUG] 16:43:04: 1044, ui.Slider1.value = 10 [DEBUG] 16:43:04: 1044, ui.Slider2.value = 11 [DEBUG] 16:43:04: 1044, ui.Slider3.value = 12 [DEBUG] 16:43:04: 1044, ui.Slider4.value = 13 [DEBUG] 16:43:04: 1044, ui.Slider5.value = 5 [DEBUG] 16:43:04: 1044, ui.Slider6.value = 6 [DEBUG] 16:43:04: 1044, ui.Slider7.value = 7 [DEBUG] 16:43:04: 1044, ui.Slider8.value = 8 [DEBUG] 16:43:04: 1044, ui.Slider9.value = 9 [DEBUG] 16:43:04: 1044, ui.Slider10.value = 10 [DEBUG] 16:43:04: 1044, ui.Slider11.value = 11 [DEBUG] 16:43:04: 1044, ui.Slider12.value = 12 [DEBUG] 16:43:04: 1044, ui.Slider13.value = 13 Which is clearly wrong. Is this a bug, or have I done something really dumb (if so please enlighten me). If it is a bug, does a workaround exist? TIA.
  14. Hi all Is there a fibaro killscene and startscene command similar to hc2? Thanks
  15. Hello, I need a help. I can see more ways od forum and marketplace for override heating zone, but they are to complicated for me. I need simple scene (or virtual device??) which will set all heating zones to specific temperature for specific time and after that back to schedule. Why I need this? I have central heating system with wood and water acumulation puffer. Sometimes temperature in system increase to high and for security reasons I need to cool down system. I made scene which control temperature in system and send me notification when temperature is too high. Notification ask me if I want to run some scene. Here I want to open all radiators. Or, if somebody have another idea, maybe I don't need override heating zone. I have Fibaro heat controller on all radiators, but I don't know how to open it to max with scene. Thank you in advance.
  16. Hi, Pretty basic question but I have searched the forum (and web) and not been able to find any solution that can help me. I have created a variable, Home_Away with two values; Home and Away. I then built two simple block scenes that says says that if a wall plug is ON it should switch to HOME (and OFF gives AWAY). I have then a ZRC-90 remote controller that puts the wall plug in in on (button 1) and off (button 2) mode. So far so good. I have then tried multiple times and in different ways to build a simple scene that should run and turn on a window light at a certain time when I'm not home (when I'm home I want to control the light myself). I have then built an additional scene that should turn the light off automatically at a fixed time when I'm not home. This doesn't work the way I want it at all... For instance, if the light is off and I put the wall plug in off (Away) mode the light still turns on - I don't want it to turn on until both conditions are met (time and variable). Adding to this is that the scene to turn it off doesn't seem to work either so I guess I'm missing some fundamental part here? Scene to turn on light below: Scene to turn off light below I can also add that my intention is to continue building from this logic to have multiple lightning scenes that only runs when the house is in Away mode. Many thanks in advance for any type of guidance!
  17. Hi guys, I seem to be missing something very basic... And wonder if anybody could give me a pointer. I want to do something as simple as this. 1) When movement is detected: Turn on the light 2) When there has been no movement for x seconds: Turn off the light (where x will be different for the different areas, e.g. from 15 seconds to 5 minutes) So I create two scenes (using the graphic blocks) 1) Turn on lights, (IF motion == Breached 0s) THEN (Turn on Lights) 2) Turn off lights. (IF Motion == Safe 60s) THEN (Turn off lights) But very frequently in my log, I see "Too many instances of the turn-off scenes". Which got me thinking. If I understand correctly, a new instance of 2) will be started every the sensor triggers that motion stops. So If I'm in the scene, and then move again within 60 seconds, scene 1) will be triggered again (but doing nothing, as the light is already on). When I stop moving again, yet another instance of 2) will be started. And then eventually, the max number of triggers are reached, which causes the error. The longer the timeout is, the more possible instances of 2) may be running. So I guess I could increase the number of instances, but is this really a good idea? Or am I going about this the wrong way? Should I instead create a LUA (which I haven't tried yet, but have a lot of programming experience), with the following two scenes: 1) Scene motion (motion == breached) Set global variable motion = yes if (number of instances > 1) exit Turn on lights while (variable motion == yes) wait 10 seconds while end turn off lights 2) No-motion (motion == safe 60s) set global variable motion = no Thanks for any advice on this. John Erik
  18. Dear gentleman, I have a problem with making a scene for ARM/DISSAR the system using the smart implant. I want to mention that my alarm system it is not a smart one. I will describe what I have done till now. I installed 2 relay on the alarm PGM exits to know the status of the system and to have a feedback if the alarm is activated. I use the smart implant as follow: 1. The OUT1 is connected to the ON/OFF impulse in order to ON and OFF the system. Each impulse will ON or OFF the system 2. The IN1 is connected as switch on the ARM/DISARM status. Basically if the relay it is open the system is DISARM and if relay is closed the system is ARM. 3. The IN2 is connected as switch for the thief alarm. Basically if the system it is ARMED and someone enter in the house this relay will be CLOSED and get a feedback. Relay = ON - ALARM and relay = OFF - NO ALARM Till now it is ok and it is works. My question is the scene. I did not succeed to make a correct scene. What I want to make it is next: 1. ARM the SYSTEM scene 2. DISARM the system scene To ARM the SYSTEM i've made a scenario like: if IN1= breached then OUT1 = On ... and the fibaro arm the system. To DISARM the SYSTEM it is similar - if IN1= safe then OUT1 = On the problem is that the system goes in to a loop. To avoid that I put a one time trigger like - OnceEg. Run Scene on 23/4/2024 at 12:30 at beginning of each scene. So in this case the system will not go on the loop but it seems that there is a mistake in my logic scheme because the if I run DISARM scene even if the IN1 is safe (meaning that the system it is already disarmed) the OUT1 give the ON impulse and arm the alarm. Please guys, be so kind and give me a solution. Thank you.
  19. I have three rooms with a Dimmer 2 in each. The dimmers are activated from motion detectors in each room. While cleaning I'd like to have the lights at full output and I have set parameter 19 to 90%. When activating the toggle switch the lights will go to 90% but when the motion sensor see a motion it will activate the scene dimming the lights to 8%. Is it possible to make S1 override all scenes as long as it is on? At the moment I turn the motion sensors towards the wall so they aren't activated but that is no sophisticated solution!
  20. Hi, After I put together the Virtual devices Introduction Tutorial I was asked would I do something similar for Scenes. I’ll preface this post (like the Virtual devices) that I am no expert but I am willing to document what I understand and it can be added to over time. It would be great if some of the experst could read through, fill in the coupelof gaps and let me know if I havesomething wrong or coudl do with better explanation I also start at a very basic level as some of the newer users people liked that with the virtual device tutorial I am also only going to Lua scenes as I have never worked with Magic Scenes or Graphics Blocks Scene Basics A scene is a mechanism to execute a lua code script for an on-demand basis. General Tab Name, Room - self explanatory ID – set when the scene is saved, doesn’t change for life of scene. This is the unique identifier for this scene and can be used as part of the startScene command fibaro:startScene (ID) Max number of instances – A scene can be called from a number of different sources. This dictates how many instance of the scene can be running concurrently. This can also be set within the scene using lua. I’m not sure if these two settings are in conflict which one takes priority. if (fibaro:countScenes()>2) then fibaro:abort() end -- or if (fibaro:countScenes()>1) then fibaro:debug("stop scene") fibaro:abort() end Lili commands – voice control for running/stopping scene using Lili who is the native HC2 personal assistant. Run Scene Automatic – it can be called from other scenes or run manually Manual – it can be called from other scenes or run manually (unsure what the difference is between manual and automatic) Disabled – scene cannot be run Scene Hidden: Not visible in the Web UI (unless you select HC2 hidden devices) Protect by Pin: Prompted for PIN CODE if scene is set to running Do Not Alarm to Stop: ??? Change Icon – select a new icon to display alongside the scene (128x128 png transparent) Advanced Tab Lua Window The code in the lua window is the defaulst header for any scene and needs to be kept. Debug window (debug output from scene code when it is run) START – Start the script running STOP – Stop the script running CLEAR – Clear the debug window Web UI View 1. Title of scene 2. Edit 3. Delete (confirmation req) 4. Icon 5. Disable/enable 6. Run/Stop scene 7. Status – populated by fibaro:log command Lua Scene Header The header of a scene always contains some of all of the following. These are used to trigger the scene in a number of different way. --[[ %% autostart %% properties %% events %% globals --]] %%autostart – including this means that the scene will run when it is saved or when the HC2 restarts. $$ properties – the user can add a device ID and parameter. Any change to this parameter will trigger/run the scene. The format is ID following by parameter. --[[ %% autostart %% properties 1429 value %% events %% globals --]] In the example above if 1429 was a door sensor and value was the status parameter that changed (0 <-> 1) when the door opened than any status change would cause the scene to run. This has to be the device ID and cannot be a variable that represents the ID %%events – ?? %%globals – the user can add the name of global variable (exactly and case sensitive). Any change to the value of the global variable will trigger/run the scene An example would be --[[ %% autostart %% properties %% events %% globals G_AREA__1 --]] A scene can be setup to trigger from properties, events or global variables The following code allows a different action depending on the trigger if this is what’s required. -- Trigger Management local currentDate = os.date("*t") local startSource = fibaro:getSourceTrigger() --Start of Scene Execution if (startSource["type"] == 'property') then fibaro:debug("Started through property") tempFunc1() -- this is calling the the function if something happens. elseif (startSource["type"] == 'global') then fibaro:debug("Started through variable") tempFunc2() -- this is calling the the function if something happens. elseif (startSource["type"] == "autostart") then fibaro:debug("Started through autostart") tempFunc3() -- this is calling the the function if something happens. elseif (startSource["type"] == "other") then fibaro:debug("Started through other ") tempFunc4() -- this is calling the the function if something happens. else fibaro:debug("Scene not started, this can only be started through other, property, global or autostart!"); end In the example above the following happens Scene triggered from property (1425 value) - it will execute function1() Scene triggered from global variable(sleepState) - it will execute function2() Scene triggered from an autostart - it will execute function3() Scene triggered from any other valid method - it will execute function4() or else the scene will no start Local Variable declaration These are variables tha you intend to use within the scene. You can also use global variable but these do not need to be declared prior to usage Many people put the local variable declaration at the start of the scene followed by the functions -- example of local variable declaration local HC2email = "true" -- Notification Alerts using Fibaro email service local HC2popUp = "true" -- Notification Alerts using Fibaro popup service notifications local pushOver = "false" -- Notification Alerts using Pushover Notification Service (Tutorial by AutoFrank) local ALLINONE = "false" -- Notification Alerts using 'All in one Notification' scene (created by jompa68) local updateData = "false" -- Set to true to update the data in the table. ** SET BACK TO FALSE ONCE COMPLETE ** Code Comments Comments /explanations in the code are very useful as the allow you to explain what the code is doing to either yourself or others You need to preface or encapsulated all comments to prevent them being executed at runtime. Example of single line and multi-line comments are shown below -- Example of a single line comment --[[ example of a multiline comment where the sentence spans one or more lines in the scene --]] In general all scenes will have the following structure but over time most people develop your own style … --[[ %% autostart %% properties %% events %% globals --]] if (fibaro:countScenes()>2) then fibaro:abort() end -- explanation of the code purpose or usage or installation -- local variable declarations -- functions -- Main Code sequence (calling the functions above) Lua command syntax is generally the same whether it is used in a scene or used in a virtual device (exceptions to this are http requests) Some useful lua command if fibaro:getGlobalValue("Occupancy_HOUSE") == "no" -- compare global value if fibaro:setGlobal("Alarm_TrigCount", "0") then -- setting global value if tonumber(fibaro:getValue(GardenSensor, "value")) == 1 -- get device status value fibaro:startScene(AlarmSet) -- Start a scene fibaro:call(1387, "pressButton", 10) -- press a button on a vd fibaro:debug("Notify Alert! "..jN[i].device.." is offline") -- print a mix of variable and text string fibaro:call(2, "sendEmail","Alert!", "Garden Sensor triggered") -- send email using HCC2 native email service -- HC2 native popup notirfication service HomeCenter.PopupService.publish({ title = 'Home Alarm Activated ', subtitle = os.date("%I:%M:%S %p | %B %d, %Y"), contentTitle = 'Zones Status', contentBody = fibaro:getGlobalValue("G_SPC_AREA_STATUS_1"), type = 'Success', }) Some useful lua functions ENCODING - replace a space in a string with another character, a + symbol in the example below This function takes one parameter - s so The Cat and the Mat will be changed to The+Cat+and+the+Mat -- function to replace a space in a text string with a + function urlencode(s) if (s) then s = string.gsub (s, "\n", "\r\n") s = string.gsub (s, "([^%w ])", function (c) return string.format ("%%%02X", string.byte(c)) end) s = string.gsub (s, " ", "+") end return s end test = urlencode(message) ROUNDIT Rounds a number to a defined number of decimal places This function takes one parameter - num (the number you want rounded) and idp (the number of decimal places) so roundit(2.12348, 3) would result in 2.123 function roundit(num, idp) local mult = 10^(idp or 0) return math.floor(num * mult + 0.5) / mult end If there are any other useful functions that you feel would be of benefit to new users please let me know and I'll include them Overall the best way to gain a greater understanding is to download the many scenes that are published to the forum and start to take them apart. I hope this will be of benefit to some users and suggestions and corrections are always welcome happy coding -f
  21. Several posts on this forum recommend including a check in LUA scenes to ensure that only one instance of the scene is currently running. The recommended code is similar to this: if fibaro:countScenes() > 1 then scenes = fibaro:countScenes() fibaro:debug(os.date("%d %b").." Scenes active "..scenes) fibaro:abort(); end The main panel for each scene, however, includes a parameter controlling max. running instances: Why is it necessary to include the extra code, if this parameter already limits the scene to one active instance? Is it only to get the explicit warning from the fibaro:debug() command?
  22. Good Day All, I'm new to Fibaro and have purchased a HCL on the confirmation from Fibaro support that it would wllow me to Open and Close Fakro Windows and Blinds through Google Assistant. I've have limited success with this and queries to Fibaro support have been met with stonewalling after the sale was made. They pointed me to the help files, which are not the easiest to follow and are inconsistent but none the less, it seems as if all is set up as required by Help. I cannot get the Hey Google, talk to Fibaro command to work. The boomy Fibaro voice cannot find any devices. It can find the HCL, but noting attached. Support did say that this was due to the fact that they are "security devices" ? A Window Blind? Stonewalling I think. Hopefully someone here may have encountered something similar and knows a solution? Attached is a screenshot of the 4 scenes I have setup in HCL Next are two screen shots showing the configuration of Blinds Evening which is similar to Blinds Morning – both of these scenes are visible in my Google Assistant and I can successfully activate them by saying “Hey Google, activate Blinds Evening” for example. Blinds Evening and Morning are created using Graphics Blocks while Blinds Open and Close are created using Magic Scenes. Next are screen shots of the Blinds Open scene (which is the same as Blinds Close except reated using Magic Scenes) – these do not show in Google Assistant - Can't figure out why. As you can see below, the Blinds Evening and Blinds Morning Scenes show up in for Google Assistant but not the Blinds Open or Close. Even if I copy the existing Blinds Morning or Blinds Evening Scenes (created using Graphics Blocks), giving the copied instances a new name, they still do not show up for Google Assistant. Lastly is a screen shot of all my devices: Here are examples of the configuration of 1 each of the blind and Skylight The scenes I have set up for morning and evening trigger all blinds from the HCL itself. My goal is to be able to activate Blind 1 – 4 (open & close) and Skylights 1 – 4 (open & close) - all individually from my Google Assistant through voice by saying “Hey Google, open Roof Light 1” for example. Has anyone cracked something like this before? Any tips are appreciated. Regards, Eamon.
  23. I have found using Hue lights through HC2 quite challenging. Although the Hue AIO VD helps a lot, it still is not as easy as i would hoped when i bought my HC2. I also have experience with Homey and home assistant. Both controllers have an option to call/start scenes that are defined in the philips hue app. For example; i have 5 Hue lights in my living room. I have a couple of scenes defined in the Hue app, 1 for warm white generic light, 1 for when we watch a movie, etc. With Home and HA i was able to start those scenes, so when i would want to change a scene, i do it in the Hue app (which is 10x more user-friendly then changing a Hue scene in HC2), and then homey or HA is able to call that (changed) scene. Can i somehow call those scene's in HC2?
  24. I found this image in the knowledge base but I can not "easily" add any activity the my harmony hub to the scene. The only way is via LUA?
  25. I have created different scenes in the block scene editor. These are all working except for the one that should do the following: 1. When I arm the alarm, the door sensor is armed. 2. When I open the door it should give me 10 seconds before the alarm goes off. 3. If I disarm the alarm, therefore disarm the door sensor within 10 seconds the alarm should not go off. This all works fine with a minor detail: if I shut the door within 10 seconds the alarm does not go off, while it should go off unless I have disarmed the alarm. I have tried the following block scene: First I tried stating at the device that if it's armed and breached it should trigger and I put a 10 second delay at the end. That did not work. Then I tried the above method checking if the door is device is triggered while armed and breached AND if after 10 seconds the device is NOT disarmed. By the way I also tried the statement if after 10 seconds it IS armed. Both with the same result: If I close the door quickly enough, I'm inside and the alarm is not triggered. Then I thought that maybe it just does not work that well within the block scenes. So I transfered it to LUA (automatic method by Fibaro). The LUA code I get, looks horrendous though. I'm not a developer, but this does not look as very well written code to me. --[[ %% properties 200 value 200 armed %% weather %% events %% globals --]] local startSource = fibaro:getSourceTrigger(); if(startSource["type"] == "other") then fibaro:call(49, "turnOn"); fibaro:call(104, "turnOn"); fibaro:startScene(12); fibaro:call(203, "sendDefinedPushNotification", "4"); fibaro:call(207, "sendDefinedPushNotification", "4"); setTimeout(function() fibaro:call(49, "turnOff"); fibaro:call(104, "turnOff"); end, 900000) else if (( (tonumber(fibaro:getValue(200, "value")) > 0 and tonumber(fibaro:getValue(200, "armed")) > 0) ) and ( tonumber(fibaro:getValue(200, "armed")) ~= 0 )) then local delayedCheck0 = false; if ( (tonumber(fibaro:getValue(200, "value")) > 0 and tonumber(fibaro:getValue(200, "armed")) > 0) ) then delayedCheck0 = true; end setTimeout(function() local delayedCheck1 = false; local tempDeviceState1, deviceLastModification1 = fibaro:get(200, "value"); if (( tonumber(fibaro:getValue(200, "armed")) ~= 0 ) and (os.time() - deviceLastModification1) >= 10) then delayedCheck1 = true; end local startSource = fibaro:getSourceTrigger(); if ( ( delayedCheck0 == true and delayedCheck1 == true ) or startSource["type"] == "other" ) then fibaro:call(49, "turnOn"); fibaro:call(104, "turnOn"); fibaro:startScene(12); fibaro:call(203, "sendDefinedPushNotification", "4"); fibaro:call(207, "sendDefinedPushNotification", "4"); setTimeout(function() fibaro:call(49, "turnOff"); fibaro:call(104, "turnOff"); end, 900000) end end, 10000) end end So here I am, with the big question to you out there: is there anyone who has this working and what code do you have?
×
×
  • Create New...