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. 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!
  2. 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
  3. 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?
  4. 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.
  5. 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?
  6. 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?
  7. 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?
  8. Hello friends, I would like to control my sonos devices via scenes. It seems not possible to do that with common ways. So maybe someone in this forum already did that via http methods, rest apis etc. Would be great help if someone has any idea about that. Thanks in advance.
  9. Jeg driver og setter opp scenes for ID-Lock 150, og med varsling for ulike brukere på døra. Det funker bra med f.eks. pushvarsel når brukeren taster inn PIN kode, men jeg får ikke til å sette opp varsel for bruk av RFID brikke. I scenen kan du velge "PIN entered by", og så i neste boks velge "RFID brikke XXXXX". Jeg laget en scene hvor første valget var PIN entered by, og så i neste blokk PIN Kode XXXX, satte opp et OR argument med samme opplegg, men da valgte jeg RFID brikke XXXX. Får varsel når PIN kode trykkes - men ikke når RFID brikken brukes.
  10. After having done a few scenes (LUA scripts) I am a little confused by some of the options offered by the HC2 interface. Here are three examples: 1. The overview Some of this is obvious, like the scene name and the number of instances currently running. But why do the last two scenes, both running, show different run/stop buttons? And what does the on/off slider signify? I have successfully started scene 3, even though it shows "off". I have also tried to set it to "on", but it goes back to "off". Question: How are these two buttons, on/off and run/stop to be interpreted and used? 2. The detailed view This view raises several questions: Category: Is this category ever used for anything? Max running instances: In my LUA scripts I normally include tests like this: if fibaro:countScenes() > 1 then ... to abort the script if more than one is running. Does that make this number insignificant? Run scene Manual/Automatic: The trigger in the LUA script (or a lack of trigger) dictates how the scene is started. For a standard manual script without trigger, what difference does the man/auto setting make? And for a script with %%autostart is it necessary to set the Run scene selector to Automatic as well? Do not allow alarm...: My interpretation is that all scenes that are alarm related should check this box, all other scenes should not. By alarm related, I mean scenes that are triggered by an alarm. Is this good practice?
  11. Hi team, I have been trying to work with a fibaro door contact and time of day being the criteria to turn on some devices. Unfortunately, it is taking the door contact and for some reason ignoring the criteria for the time of the day. Here are a couple of screenshots of the settings for your to look at.
  12. it's possible to integrate HC2 with an ip-camera by specifying URL:s for the video stream and controlling it with left/right/up/down URL:s etc. This is one-way communication from HC2 to the camera. Now, some cameras can be armed/disarmed, which means that it will start to record when it detects motion. The idea is that this should trigger an alarm in HC2. My idea is to have a scene which can arm/disarm the camera and then, when the camera detects motions it should trigger a scene in HC2. Has anyone figured out how to trigger a scene in HC2 when the camera detects motion? Is there any kind of support for this? Also, is it possible to arm/disarm your camera through HC2?
  13. I'm completely new to scene creator's, and i Wonder if someone could help me out With a start... I would be happy if someone could post me some examples of Block scenes for: A wall plug turning off after a period of time, and then send SMS/push Notification to a cell phone.... Door changes status from locked to open - turn one/several lights on and send SMS/push Notification to cell phone This would be a start for me
  14. Hello Fibaro team, Internet as we speak is transforming towards more and more use of HTTPS and TSL. My question is simply, is there a timeplan for HC2 to transfer from HTTP to HTTPS also on the local site access solution? I understand there can be difficulties with the certificates...... For example, I would prefer to send an HTTPS request to HC2 for starting scenes or altering status on a device, where username and password are protected with TSL transmission. Kindly, DrPepper
  15. Hi, I create a pop-up notification, which works well, except the button does not trigger my scene. I double and tripple checked the scene, add more or less buttons, tried different scenes, but nothing works. If I hit the button on the pop-up it only disappears, but no scene is triggered. Is there anyone can help on it? Do I need to set anything else in the HC2? or the pop-up scene? My scene is as follows: I also confirm that the scene for the button is working. --[[ %% properties %% events %% globals --]] local imgUrl = 'http://192.168.1.200/fibaro/icons/scena/User1043.png' local currentDate = os.date("*t"); --[[ if (fibaro:countScenes() > 1) then fibaro:abort() end --]] -- opening the pop-up window, HomeCenter.PopupService.publish({ -- title – required field, title = 'Laundry', -- subtitle – optional field, subtitle = string.format("%02d:%02d:%02d | April %02d, %04d", currentDate.hour, currentDate.min, currentDate.sec, currentDate.day, currentDate.year), -- Title of the pop-up content (optional), contentTitle = 'Laundry is ready', -- Content of the pop-up – required field, contentBody = 'Please confirm', -- Image of the notification (acceptable formats - .jpg, .png, .bmp), img = imgUrl, -- Notification type: ('Info' – blue color, 'Success' – green color, 'Warning' – yellow color, 'Critical' – red color) type = 'Info', -- defying buttons – ‘caption’ – text of the button, sceneId – Id of scene that will be started after clicking on button (0 – no scene will be started), you can defy up to 3 buttons, in default there will be a button with ‘Ok’ buttons = { { caption = 'OK', sceneId = 285 } } }) thanks for helping
  16. when creating a scene I get the message 403 ACCESS FORBIDDEN. None of mye scenes are working anymore, and I cannot create new ones. I have deleted the old scenes and restarted the Home center lite but does not help. Any solutions anyone??
  17. Ho Folks, I have a simple question about the number of running instances of a scene. I have a basic scene which triggers every hour between 14:30-22:45 'and' if the lux level is <10 (screen shot attached). Can anyone explain to me why there are running instances of this scene outside of the parameters? Right now it's 11:50AM, the lux is 630, but I already have 2 running instances of the scene. Am I doing something wrong?? Any help welcome.
  18. Updated Aug 2018 Now that my setup is reaching an amount of stability and it is getting to where I want it I decided I would update my setup post and also structure it a bit better. The core of my automation system if I exclude all the AV equipment is as follows HC2 runnnig 4.18. Approximately 102 z-wave devices and about 20 Sonoff wifi devices running Tasmota RPi running sonos http-api and HA Bridge, RPi running Unifgi Controller, RPI running octpprint fro 3d printer control, SPC Gateway for Siemens Alarm integration 4 IP cameras, 6 Echo Dots, 14 sonos zones, GC-100-12 for IR control over all media devices (TV, Media Sources, Projector,, etc), HDMI Matrix Automatic Dust collection system in garage (3d printed blast gates, limits switches with wemos D1 mini monitoring inputs and smart control switching of vacuum system) Room setup I have the usual rooms across ground floor, first floor, garage and outside I also have a section called System with the following rooms where i have all my scenes and VD's (more details on this below) Control – manual control of house stuff, Settings – Where I can tweak the automation, Status – display various system status stuff, Automation – only used by other scenes/VD, Alexa – only used by Alexa Development – stuff I’m working on Critical Scenes and VD’s Main Scene – master scheduler & Hometable – used to track id’s of scenesm, VD’s and devices and custom icons Timers + Sunset/Sunrise + weather courtesy of Sankotronic SCVD Watchdog scene - monitors for error or stopped VD and restarts them, monitors for specific debug messages and clears them if required Smart message Hub – used for main events that I want to know happen (alarm on/off, house modes, etc) Multiple Data Loggers – used for background tasks that I can check if I need to (keep clutter out of message Hub) Network device Monitors & State Table to track network devices status and system state information Lights in critical areas are automated as well as music and media, the rest is manual when needed. House modes can override automated settings (entertain mode changes behavior of garden, patios, bbq area lights) Some of what I have running is... Morning audio greeting in our bedroom and the kids bedroom, weather, temp in house, time, etc (our alarm clock!) 2. After greeting it groups players, selects a radio station, checks if it's available and if not selects another one Starting music in the kids bedrooms for night time. I also check periodically if the radio station available and restarts the radio station or selects another one if not available. Announcements for when fridges or freezers go over temp One button click for night, welcome back, leaving home (music, lights, TV, music adjustment + audible greeting ( time and temp of house on arrival) open zones on leaving, Zone Inihibit leaving and night options if windows are left open TV switch on in the playroom switches off the music, camera snapshops of front gates when they are opened/close Use of MP3 clips that systems uses instead of Polly TTS if internet is offline ... and the list goes on System Overview
  19. Hi, Running 4.180 version of HC2 SW. But, I have noticed the phenomena also on the 4.170. Not sure about earlier versions though. Situation/Scenario: 1. Leaving home for a week to business travel. 2. Cautious about risks for lightning - pulling all electronics apart from "absolute bare minimum". 3. HC2 is using regular network cable. 4. As HC2 is to run during absence, but rest of network is not, cable between HC2 network outlet and rest of network (switch, router etc) is disconnected to avoid "rolling lightning bolts" still hitting electronics just because they are physically connected. Expected outcome: Any scene triggered automatically, based on time or other local value/setting/trigger device, should still run. Actual outcome: Scenes not triggered automatically. Extra information: Once network cable is connected to switch/router, scene activation starts to work again as per expectation. Please let me know if you need more data to trouble-shoot this phenomena. Kindly, DrPepper
  20. Hi UPDATED 1.1 UPDATED THIS VD FROM A SCENE WATCHDOG TO A SCENE & VIRTUAL DEVICE WATCHDOG Hopefully this will be a useful little VD to some users It was inspired by a comment made by @tinman (I think) This VD Enables a user to scan all scene and virtual device DEBUG MESSAGES and trigger on predefined key words in the debug messages. This may be useful to see if a scene develops an error or perhaps you are just looking for a keyword for a different reason All scenes and virtual devices are included by default Specific scenes and virtual device id's can be flagged to exclusion Separate watch lists for scenes and virtual devices A watchdog report is sent for all matches identified. Can be sent via email or smart message hub You get one email or message per id flagged ( not per watch word) It will send message if no match in either vd or scene is found (added in v 1.1) Suggested icon included below Note: If you use the Smart Message Hub please add that scene ID into the exclusion list as that scene will be flagged by the watchdog after the first use. This can be run on demand or on a schedule using Main Scene by @Sankotronic or similar. I run it on a schedule once per day Installation Import the VD Configure the following as required -- user configurable local jT = json.decode(fibaro:getGlobalValue("HomeTable")) -- comment out if HomeTable is not used watchListSC = {"syntax", "error", "line334", "concatinate"} -- words that you want to watch in scenes watchListVD = {"expected", "unfinished"} -- words that you want to watch in virtual devices excludeList = {"23", "32"} -- scene and virtual device id's that you would like to exclude from watching SMsgH = true -- set to false if you don't use smart message hub SMsgHtarget = "pushover" -- set to preferred medium if you use smart message hub deBug = false -- enable for greater debug verbosity Place on a scheduler if required The VD has a status label and when it was last run and this is what the report looks like on pushover VD attached scvd_Watchdog_1.1.vfib
  21. I try to get some data from a http:request in a LUA scene. I have the following code: local strLonoID = fibaro:getGlobalValue ("LonoID"); print ("LonoID = ", strLonoID) local Temp1 = fibaro:getGlobalValue ("LonoTemp1"); print ("LonoTemp1 = ", Temp1) local http = net.HTTPClient() http:request('http://lonobox.com/api/index.php?id=100003523', { success = function(current) --fibaro:debug(json.encode(current)) --werkt if current.status == 200 then print('Data Receiving: ', current.status) -- werkt print('CurrentData: ', current.data) -- werkt local result = json.decode(current.data) print ('Result :', result) --Local temp2 = result.(["CurrentData"]["200003523"]["temperature"]) --local temp2 = result.200003523.temperature --print ('Temp2 :', temp2) -- else fibaro:debug(current.status) end end }) and i have as output: [DEBUG] 17:13:32: LonoID = 100003523 [DEBUG] 17:13:32: LonoTemp1 = 2 [DEBUG] 17:13:32: Data Receiving: 200 [DEBUG] 17:13:32: CurrentData: [[],{"200003523":{"temperature":"23.2","humidity":"46"}},{"400004105":{"wind-speed":"0.2","wind-gust":"1.5","wind-direction":"SE"}},{"100003523":{"barometer":"1014"}}] [DEBUG] 17:13:32: Result : table: 0x9c98200 I want to store the values in global variables. I do not know how to proceed from here. Thx in advance. Fons
  22. Hi - This may be a proper newbie question but when I create a block scene I don't see the on/off slider option - just RUN and STOP. Thx
  23. hi, This tutorial is based on an idea that i believe originated to @cag014 some time back and has been adopted by many. So well deserved kudos to @cag014 and others that helped originate and develop the concept. I am merely a scribe that has benefited from this. I decided to write a quick tutorial for two reasons... I implemented this over christmas and and found it very useful and much easier than I thought It would appear that we have some new forum members that got HC2 devices from Santa The core of this approach is to store all the reference ID's to your devices, virtual devices, scenes, etc in a json encoded table. The references like jT.kitchen.light are used in the scene or vd and device ID can easily be changed in the table. One important benefit is that it you need to exclude/include a device the device ID will change. With this approach you simple change the reference in the Home table and your done. Without this approach you wll need to go through your code and change the device ID where appropriate. ** This doesn't get over the need to enter ID as triggers in the scene headers as fibaro doesn't allow variable in the header ** The solution has two parts to it. The home table itself where the data is stored. - this is held in a predefined variable (lower part of variables panel) The references in your scenes and virtual devices use this table HOME TABLE This can be created and maintained through either a scene or a virtual device. I chose a VD but there is no advantage I can thing of using one way or the other. Go to Panel, Variables Panel and create a new predefined variable (lower part of panel) called HomeTable. When you create a predefined variable it has two values. Name the variable and save. Edit the variable and simply delete the second value. Using either a scene or a vd create your table and store it. This is lua from my VD. I create one button and enter the code below. The top part shows the format of the table. I opted to place each element I am looking to store into rooms and/or other natural groupings but you can choose any way to structure. I'll attached a copy of my full table at the end of this to show what I use it for. The next part encodes and stores the data The last part is where I read back one entry to show the table stored okay. -- HOME TABLE FOR ALL DEVICES, SCENES ETC. jsonHome = { hall = { Lights=88,Lamp=1421,Temp=1,Motion=1,Humidity=1,Lux=1,ZRC90=1447,SmallBathLight=147,SmallBathMotion=1, SmallBathTemp=1,SmallBathLux=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, kitchen = { Pendant=176,Table=174,Spotlights=90,Temp=1549,Motion=1548,Humidity=1551,Lux=1550,UV=1552,XmasLight=1531, WineFridgeTemp=1,Dishwasher=1,rcTV=1490,rcSonos=1561,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, } jHomeTable = json.encode(jsonHome) -- ENCODES THE DATA IN JSON FORMAT BEFORE STORING fibaro:setGlobal("HomeTable", jHomeTable) -- THIS STORES THE DATA IN THE VARIABLE fibaro:debug("global jTable created") -- STANDARD DEBUG LINE TO DISPLAY A MESSAGE -- I then like to read back a entry from the table to show that the table didnt get corrupt in the process. local jT = json.decode(fibaro:getGlobalValue("HomeTable")) -- REFERENCE TO DECODE TABLE fibaro:debug(jT.kitchen.Motion) -- DISPLAY ONE VARIALE the output of this when I click the button (or run the scene is as follows) It is reading back the ID (1548) stored for Motion under the kitchen grouping I would recommend using an external editor like Notepad++ or Zerobrane to edit/manage the code in the vd and then copy back to the vd when ready to update as the HC2 lua editor is very small At this stage you now have your table REFERENCING THE TABLE CONTENTS IN YOUR SCENES AND VIRTUAL DEVICES For this you need to place the following line of code in each scene or vd local jT = json.decode(fibaro:getGlobalValue("HomeTable")) and then use references instead of device ID's in the scene code. The easiest way to explain this is with an example. This scene switches on a light in my kitchen if it is dark, motion is detected and no light is on already --[[ %% properties 1548 value %% events %% global --]] local jT = json.decode(fibaro:getGlobalValue("HomeTable")) -- KITCHEN AUTOLIGHTS if (tonumber(fibaro:getGlobalValue("Darkness")) == 1 ) and (tonumber(fibaro:getValue(jT.kitchen.Motion, "value")) > 0 ) and (tonumber(fibaro:getValue(jT.kitchen.Spotlights, "value")) == 0 ) and (tonumber(fibaro:getValue(jT.kitchen.Pendant, "value")) == 0 ) and (tonumber(fibaro:getValue(jT.kitchen.Table, "value")) == 0 ) and (tonumber(fibaro:getValue(jT.sunroom.Light, "value")) == 0 ) and (tonumber(fibaro:getValue(jT.sunroom.Lamp, "value")) == 0 ) then fibaro:call(jT.kitchen.Pendant, "setValue", "40") UpdateEventLog("kitchen lights auto on") end It's easy enough to see how the references are built up if you examine the scene v the table at the top of this post and that it !! Addition: If you need to adjust a single parameter in the table you can use the following. This can be useful if you don't want to adjust one value and then copy the whole table back into the vd and update or more useful if you want to adjust the value in the fly in a script. -- NEW PARAMETER VALUE jT.kitchen.Motion=2000 -- TO SAVE THE CHANGE jSonosTable = json.encode(jT) fibaro:setGlobal("SonosTable", jSonosTable) fibaro:debug("global jTable created") Hopefully this will help some users If you have any suggestions as to how to improve this please let me know and I'll edit -frank ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Copy of my table to show how flexible this approach can be jsonHome = { system = { Sunset_SunRise=1560,houseStatus=1507,alarmStatus=881,HouseTemps=1236,sonosSummary=1407,sonosTTS=1452, sonosSequences=1536,TVSequences=1545,lightingSequences=1534,powerConsump=1484,specialHouseMode=1538 }, hall = { Lights=88,Lamp=1421,Temp=1,Motion=1,Humidity=1,Lux=1,ZRC90=1447,SmallBathLight=147,SmallBathMotion=1, SmallBathTemp=1,SmallBathLux=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, playroom = { Light=84,TVLight=1438,XmasLight=1518,Motion=1595,Temp=1596,rcPlayroomTV=1487,rcSonos=1574,Lux=1597,Humidity=1598,UV=1598,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, living_room = { Light=231,libraryLight=164,libraryTopSocket=166,Temp=1584,Lamp=1423,Lux=1585,Motion=1583,Humidity=1,UV=1,TVLight=1499,XmasLight=1513,rcSonos=1,rcLivingRoomTV=1506,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, utility_room = { Light=141,Temp=1194,Motion=1270,Humidity=1,Lux=1,UV=1,FreezerTemp=1,Washer=1,Dryer=1 }, equipment_rack = { RackSummary=1453,Rack1Temp=1192,Rack2Temp=1193,fanUpper1=1432,fanLower2=1434,powerAmpLower=1269, powerAmpUpper=1267,heatingFlowTemp=1199,rcSatBox=1491,SatBoxPresets=1492,rcHdmiMatrix=1489,rcAppleTV=1539, rcAppleTvSystem=1540,rcBluRay=1544,rcDroidBox=1541,networkMonitor=1493,avDeviceMonitor=1494,haDeviceMonitor=1495,hc2Resources=1391 }, kitchen = { Pendant=176,Table=174,Spotlights=90,Temp=1549,Motion=1548,Humidity=1551,Lux=1550,UV=1552,XmasLight=1531, WineFridgeTemp=1,Dishwasher=1,rcTV=1490,rcSonos=1561,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, sunroom = { Light=172,Lamp=6,projectionScreenPower=1509,rcProjector=1542,rcProjectorScreen=1543 }, dining_room = { Light=25,Lamp=1,Motion=1,Temp=1202,Lux=1,Humidity=1,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, pizza_bbq_area = { CenterLights=253,Spotlight=710,Lanterns=712,HeaterSwitch=255,LEDLights=238,Motion=705,Heaters=250,Temp=1,Lux=1, Humidity=1,rcSonos=1,PizzaBbqCam=761,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, garage = { Light=895,BenchLight=1,DoorOpener=80,DoorStatus=778,Temp=1578,Humidity=1590,Lux=1589,Motion=1587,UV=1591, GarageControl=1559,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, driveway = { porchLight=68,pillarLights=145,Spotlight=893,Motion=1429,GateTemp=958,GateOpener=94,GateStatus=956,GateControl=1537,DrivewayCam=1556,FrontDoorCam=1557 }, back_garden = { patioLight=64,utilityLight=76,sidePatioLights=60,boundaryLights=62,Spotlight=58,Motion=1427,Humidity=218,Lux=217,Temp=958,XmasLight=1523,BackGardenCam=1558 }, hotpress = { Light=143,DoorStatus=888,Temp=890 }, bathroom = { Light=162,MirrorLight=1468,MirrorDemist=1470,Temp=1170,Humidity=1,Motion=1 }, guest_bedroom = { Light=31,Lamp=718,Temp=1588,Motion=1587,Lux=1589,Humidity=1590,UV=1591,BathLight=1,BathTemp=1,BathMotion=1,BathHumidity=1,BathFan=1,BathMirrorLight=1460,BathMirrorDemist=1462,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, master_bedroom = { Light=56,LampDad=29,LampMum=1,Temp=1,Motion=1247,Lux=1, Humidity=1,BathLight=1,BathTemp=871,BathMotion=870,BathHumidity=1,BathLux=872,BathFan=1,BathMirrorLight=1464,BathMirrorDemist=1466,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, lau_eth_bedroom = { Light=52,Temp=1185,Motion=1253,Lamp=1440,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, frank_bedroom = { Light=54,Temp=1200,Motion=1255,Lamp=1450,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, office = { Light=33,Temp=1186,Motion=1251,Lamp=720,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, Landing_Stairs = { stairsLight=92,landingLight=168,rcSonos=1,TTS_message="",TTS_volume=10,RadFav=3,IsPlaying=1,nowPlaying="",vol=1,clip="" }, scene = { MainScene=614,AlarmControl=598,rebootHC2=593,goodMorning=463,goodNight=331,LeavingHome=483,welcomeHome=488,quietMorning=499,kidsToBed=490,plaroomTvOn=580,firstFloorMusicOn=579,firstFloorAllOff=578, hallSceneControl=519,StairsLight30=556,GateOpen5=526,GateOpenHold=361,GateOpenClose=425,DumpEventLog=565,PlayroomOff=617 }, vd = { AlarmManagement=881,TVPresets=1545,SonosTTS=1452,LightPresets=1534,HouseModeExt=1538,SonosPresets=1536,RackTempMngt=1453,MediaSourcePresets=1567,JhomeTable=1566,GateControl=1537,GarageControl=1559 }, users = { admin=2,frank=1564,sylvia=1565 }, ios = { frankS6=993,sylviaS7=1526,frankipad=1532,sylviaipad=1533 }, IsOnline = { GlobalCache=1,SatBox=1,AppleTV=1,AndroidBox=1,TVPlayroom=1,TVKitchen=1,TVLiving=1,Projector=1,HC2=1,SynNAS=1,AlarmGateway=1,AlarmPanel=1,SonosAPI=1,DrivewayCam=1,GardenCam=1,FrontDoorCam=1,PizzaBBQCam=1,Internet=1,USG=1,HouseAP=1,GarageAP=1 }, }
  24. Hi, I am looking for help to figure out what is causing the memory (RAM) consumption on my HC2 to climb to 90%. If I reboot the HC in the evening the memory seem to climb over night and the following morning some scenes will start to fail and the box will ultimately become unresponsive. My setup is as follows (approx.) HC2 - 4.070 60 devices 15 virtual devices 24 scenes – mix of “when true do” and ones that start vix a button 35 global variables (mostly SonosLastCmd and TTS as I have 14 zones) From reading on the forum I understand that the number of scenes, global variables, devices and virtual devices is not an issue for the HC2 from a capacity. I suspect I have a rogue scene but have been through them all looping for infinite loops that accumulate resources over time. All of my scenes are Lua and reasonably simply. Determine house occupancy from a number of sensors, wat for a global variable to change and trigger an action, etc I there some way to review a log of all that is happening so I can pick my way though it for issue. Or is there another way to see what is consuming the memory. I could disable one scene every evening but that would take too long and I am writing new scenes every week. Any help appreciated Thanks -F
  25. Hello, I just introduce myself as a newbee into the world of the Fibaro HC2. I received today my HC2 en try to setup my system. I created some scenes and like to put a scene on and off with a "ON/OFF" button the way the scene is deactivated and swithed off when I press the "OFF" button and activated and switched on when I press the "ON" button. I like to use this ON/OFF button via the Fibaro App on my smarthphone and via the Fibaro KeyFob. I read something about a procedure to work with a virtual device button, can someone explain how this works.Of course ny other solution is welcome! I look forward to some reflections to help me out as a newbee. Nice greetings,
×
×
  • Create New...