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 'scene'.



More search options

  • 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

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

Found 200 results

  1. Many users have downloaded All-in-One Scene and I believe there are some questions about usage. The purpose of this topic is to help to get most of All-in-One Scene , to share best ideas/actions and solutions. Please feel free to ask any scene's related question and I'll share my best solution with you.
  2. This is a thread for the fibaroapiHC3.lua sdk that is under development (keeping it separate from the HC3 QuickApps coding - tips and tricks thread) I've started to run and test HC3 QuickApps offline and have made a fibaroapi.lua file that can be included to emulate the fibaro calls and call out to the HC3. This means that a whole QA can be developed offline, debugged and verified before deploying to the HC3. Something that significantly reduces the development process. fibaroapiHC3.lua: fibaroapiHC3.lua (v0.131) The code is updated weekly so please make sure you have the latest... It's similar to the old fibaroapi for the HC2 in a thread started by @riemers but with more extensive support to create a better "offline experience"... (enable English subtitles to see instructions) (note the nice tooltip and autocompletion of fibaro commands we get with the fibaroapiHC3plugin for ZBS) Some benefits: Use a modern development environment such as ZeroBrane Studio (free for Mac/PC/Linux, HC3 plugin here) on your laptop/PC to develop and debug QuickApps and Scenes Step through code, inspect Lua variables, set break-points etc - all that is possible in a good IDE. Faster to pin-point errors as the error messages are better than on the HC3 - stack-traces etc. Use the whole Fibaro API fibaro.call etc and net.HTTPClient(), setTimeout(), json.ecode/decode, QuickApp self:functions like self:getVariable, self:updateView Support for MQTT client and QuickApp child devices Both QuickApps and Scenes are supported. Scenes support most conditions and are triggered by real triggers from the HC3 or simulated triggers. Speed up clock to run faster than real time, to watch a Scene or QuickApp over days/weeks/months in seconds. Start at any given time and date - test if your scene behaves on week-ends ? Automatically create a proxy QuickApp on the HC3 that sends UI clicks back to the code your are running and displays self:updateView updates. This way you can test the QuickApp UI (buttons etc) and still debug the main code on your PC. Run completely disconnected from the HC3 simulating devices and other resources (now you can take your coding with you on your vacation ) There is a possibility to download resource definitions from the HC3 and use them (devices, globals etc) while running disconnected. Move the code as-is over to the HC3 when it runs in the emulator - and it will most likely run on the HC3. Scenes needs to be moved to conditions/actions part on the HC3 - may automat that in the future. Oh, and an emulated Web GUI for the quickApp so you can try out button/slider clicks without connecting to the HC3. And lastly, it makes it fun to develop code for the HC3 To get going define hc3_emulator.credentials = {ip=<HC3_IP>, user=<username>, pwd=<password>} } and include dofile("fibaroapiHC3.lua") An example of a minimal QA can look like if dofile and not hc3_emulator then hc3_emulator = { name = "My QA", poll=1000, -- Poll for triggers from the HC3 every 1s credentials = {ip="192.168.1.X", user="<user>", pwd="<password>"} } dofile("fibaroapiHC3.lua") end function QuickApp:onInit() fibaro.call(88,"turnOn") -- turns on device 88 on your HC3 end We wrap the emulator specific stuff inside "if dofile and not hc3_emulator then .... end" as the symbol 'dofile' is not defined on the HC3 and will thus be false and not include the code - This means that we can take the code as-is and paste it into the HC3 and it works. Most of the functions are there and will be improved over time. There are support for net.HTTPClient() and setTimeout/clearTimeout and api.* There are support for getting triggers and events from the HC3 Support for auto-creating a QuickApp proxy with UI elements that sends events back to the code being debugged. There are support for both QuickApps and Scenes (with conditions) Currently supported (v 0.126) fibaro.debug(type,str) fibaro.warning(type,str) fibaro.trace(type,str) fibaro.error(type,str) fibaro.call(deviceID, actionName, ...) fibaro.getType(deviceID) fibaro.getValue(deviceID, propertyName) fibaro.getName(deviceID) fibaro.get(deviceID,propertyName) fibaro.getGlobalVariable(varName) fibaro.setGlobalVariable(varName ,value) fibaro.getRoomName(roomID) fibaro.getRoomID(deviceID) fibaro.getRoomNameByDeviceID(deviceID) fibaro.getSectionID(deviceID) fibaro.getIds(devices) fibaro.getAllDeviceIds() fibaro.getDevicesID(filter) fibaro.scene(action, sceneIDs) fibaro.profile(profile_id, action) fibaro.callGroupAction(action,args) fibaro.alert(alert_type, user_ids, notification_content) fibaro.alarm(partition_id, action) fibaro.setTimeout(ms, func) fibaro.clearTimeout(ref) fibaro.emitCustomEvent(name) fibaro.wakeUpDeadDevice(deviceID) fibaro.sleep(ms) net.HTTPClient() net.TCPSocket() net.UDPSocket() api.get(call) api.put(call <, data>) api.post(call <, data>) api.delete(call <, data>) setTimeout(func, ms) clearTimeout(ref) setInterval(func, ms) clearInterval(ref) mqtt.Client.connect(uri, options) <mqttclient>:addEventListener(message,handler) <mqttclient>:subscribe(topic, options) <mqttclient>:unsubscribe(topics, options) <mqttclient>:publish(topic, payload, options) <mqttclient>::disconnect(options) plugin.mainDeviceId class QuickAppBase class QuickApp class QuickAppChild QuickApp:onInit() -- called at startup if defined QuickApp - self:setVariable(name,value) QuickApp - self:getVariable(name) QuickApp - self:debug(...) QuickApp - self:updateView(elm,type,value) QuickApp - self:updateProperty() QuickApp - self:createChildDevice(props,device) QuickApp - self:initChildDevices(table) sourceTrigger - scene trigger Supported scene events: {type='device', id=<number>, property=<string>, value=<value>} {type='global-variable', property=<string>, value=<value>} {type='date', property="cron", value={ <time> }} {type='date', property="sunset", value={ <time> }} {type='date', property="sunrise", value={ <time> }} {type='manual', property='execute'} {type='custom-event', name=<string>} {type='device' property='centralSceneEvent', id=<number>, value={keyId=<number>, keyAttribute=<string>}} json.encode(expr) json.decode(string) --------------------------------------- -- Emulator properties/functions --------------------------------------- hc3_emulator properties hc3_emulator.id=<QuickApp ID>, -- default 999 hc3_emulator.poll=<poll intervall>, -- default false. Interval i ms to poll for new rigger from the HC3. 1000-2000 is reasonable... hc3_emulator.type=<type>, -- default "com.fibaro.binarySwitch" hc3_emulator.speed=<speedtime>, -- default false hc3_emulator.proxy=<boolean> -- default false. Creates a proxy on the HC3, ignore id. hc3_emulator.quickApp=<boolean> -- default false. Connects to an existing quickapp on the HC3 with given id hc3_emulator.UI=<UI table>, -- default {} hc3_emulator.quickvars=<table>, -- default {} hc3_emulator.loadDB=<boolean> -- If true tries to load resource database (only if offline==true) hc3_emulator.createQuickApp{ -- creates and deploys QuickApp on HC3 name=<string>, type=<string>, code=<string>, UI=<table>, quickvars=<table>, dryrun=<boolean> } hc3_emulator.createProxy(<name>,<type>,<UI>,<quickVars>) -- create QuickApp proxy on HC3 (usually called with fibaro._start) hc3_emulator.post(ev,t) -- post event/sourceTrigger hc3_emulator.offline = <boolean> -- Set to true in beginning of file if running simulated devices.. hc3_emulator.createDevice(deviceID,deviceType) -- Create an offline device of a given type. When offline device are also autocreated of type binarySwitch. More doc on this is coming hc3_emulator.copyFromHC3() -- Downloads resources from HC3 and stores in HC3sdk.db If someone wants to try this in another IDE than Zerobrane that I use (like Visual Studio) the only thing that could be an issue is to have access to the Lua libraries require ("ssl.https") require("socket.http") require("socket") require("ltn12") They are pretty standard lua libraries - based on LuaSocket. @10der has managed to run it under Visual Studio on Windows. Any improvements are happily received (in code) and credits will be due granted. Links to notable post A ZeroBrane plugin to make life easier while debugging A post introducing the SDK with QuickApps. A post introducing the SDK with Scenes. Scene support is not complete. MQTT support. Another post with running a scene completly without being connected to the HC3. Some notes on the implementation of the SDK - if you would like to hack on it A collection of QA's I developed with the SDK - which means that they can be run offline ChildrenOfHue. A QA that creates QA children devices for your Hue devices (It's the Hue QA I use myself these day) iOSLocator. A iOS geopresence QA. iCal (iOS,Google) QA Telegram QA. Event watcher QA. Helper QA to get/subscribe on event triggers Vonage/Nexmo SMS service. Send SMS. Changelog: v 0.67 - numerous bug fixes caused by the restructuring. hc3_emulator.start{startTime="07:00 4/5/2000"} - will start the simulation at the given time. v 0.68 - fibaro.debug behaves more like original. v 0.70 - better offline support and speeding. v 0.72 - More offline and support for downloading HC3 resources to be used while running disconnected from the HC3 v 0.73 - Various speed-time related bugs v 0.75 - Better http sync behaviour. Set hc3_emulator.asyncHTTP=true to get some pseudo asynchronous behaviour v 0.77 - Support for 5.030.45. Initial support for childDevices and fixes for the changed handling of UI events v 0.78 - UI fix. Name of callbacks defaults to button.."Clicked", unless you have a onReleased=name or onChanged=name in the UI table struct. v 0.80 - Fixed bug in self:getVariable and self:setVariable v 0.81 - Better quickVariables handling for proxies, and self.childDevices list updated when children are deleted. v 0.83 - self:getVariable returns the empty string "" if the variable does not exists according to the latest behaviour on the HC3... 'class' is not redefined if available from Luabind... However, I've not had a chance to test if it's 100% compatible yet... v 0.84 - Initial support for mqtt. You need to have installed https://github.com/xHasKx/luamqtt so that require("mqtt") works from fibaroapiHC3.lua. I have tried to mimic the HC3 mqtt api but I have not really used mqtt that much so if someone uses it with fibaroapiHC3.lua and discovers if stuff is not compatible with the HC3 implementation please let me know and we fix it. v 0.85 - Compatibility fix for function 'class' to adhere more closely to the HC3/luabind version v 0.90 - Cleanup of code, Better handling of children and QuickApps, ZBS color output with ansi escapes; hc3_emulator.colorDebug=true v 0.93 - New model for QuickApp proxies. Better child device compatibility. v 0.95 - Various bug fixes - log prints more in line with HC3 log console. fibaro.emitCustomEvent bug fix. v 0.98 - First support for backup/download/upload with the ZeroBrane plugin (another post here) v 0.99 - Better trigger handling and new way to include SDK in your QA/scene code. No hc3_emulator.start at the end. v 0.100 - Web GUI emulator for QuickApps. New format for using credentials.lua. Bug fixes... v 0.102 - Better handling of children and their quickAppVariables v 0.104 - Rewrite of offline mode. Better web UI support. v 0.105 - Support for new QA file format (proxies work again) v 0.106 - Added support for net.UDPSocket() v 0.109 - UDPSocket bug fix. ( @10der), property() support for class() - much harder than it looks... v 0.110 - Oops, serious bug in 'class' affecting ...everything. Hopefully fixed. v 0.111 - Removed unnecessary os.exit(). urlencode api calls ( @10der) v 0.112 - UDP fixes. ( @10der) v 0.114 - Bug fix (global 'self' escaped) v 0.115 - Bug in url encode for api calls. UDPSocket :bind(ip,port) function added. v 0.116 - :bind(ip,port) really fixed.... v 0.117 - startup fix v 0.119 - "Softer os.exit()" - better compatibility with Visual Studio (thanks @10der) v 0.120 - Debugger friendly QuickApp class (no __index). First version of file/backup v 0.121 - api.get bug fix. Faster proxy/deploy. v 0.123 - QuickApp:setVariable bug (thanks @10der) v 0.124 - fibaro.clearTimeout added, MQTT fixes. v 0.125 - fibaro.alarm() was buggy - fixed. Set self.USERPIN to pincode to allow fibaro.alarm("disarm") to be allowed from emulator. v 0.126 - fix __fibaro_get_device() ( @10der) v 0.128 - fix sort order of triggers. Default room in offline mode ( @10der) v 0.130 - fix UI handling ( @rangee. More UI options. v 0.131 - fix uiCallbacks not always updating when updating proxy
  3. Main scene FTBE v 1.3.4 Hello everyone! NEW version is OUT! More about scene and download you can find here: WHAT'S NEW: Main scene FTBE 1.3.4 - changed function for time of day calculation and added use of SleepState global to set time of day to morning when Awake regardless of current time Main scene FTBE 1.3.0 - cleaned some bugs, added some more checks to prevent scene from stop running due to errors. Optimized and compacted code, removed unnecessary comments. DemoMode only stops changing timers while user code and scheduled events will continue to execute. Darkness can now be changed by measured lux level or global variable that is set to lux value measured by light measuring devices placed outside. Scene is now running on setTimeout function instead on sleep for better timing and also aligns to 0 seconds or exact minute. Sunrise & Sunset VD v1.4.0 - Modified main loop code to better handle global variables. Variables are now automatically repaired and are not reset to default settings after HC2 reboot. Added variable SunriseIcon to store VD icon ID and now when main icon for VD is set also all button icons are set automatically. Home Status VD v1.1 - Added variable HomeStatIcon to store VD icon ID and now when main icon for VD is set also all button icons are set automatically. Added label that shows most important values on VD when closed. Home Timers VD v1.1 - Added variable HomeTimersIcon to store VD icon ID and now when main icon for VD is set also all button icons are set automatically. Added label that shows most important values on VD when closed. NOTE - This version is compatible with previous versions so need to do any changes in your current code of other scenes and VD's. REQUEST - If you like my work and found it useful please give me support by rating and writing short review. Thank you! PS Dear friends from Slovakia you can find this scene and VD translated to your language here: HomeSystem.sk
  4. Is it possible to write a (one) trigger for the HC3 scene that responds to all devices, whose interfaces are light. I don't want to write for every light device a trigger.. What I've tried, and it doesn't work is: { operator = “all”, conditions = { { type = “device”, property = “value”, operator = “anyValue”, isTrigger = true } } } OR id= Or id = {45, 46}, --omit altogether and hard to maintain OR id= fibaro.getDevicesID Or id = fibaro.getDevicesID({ Interfaces = {“light”,}, Properties = { dead = false,}, Enabled = true, Visible = true }), And changing 'device' to 'interfaces' or 'interFaces' doesn't work either. { operator = “all”, conditions = { { type = “interfaces”, property = “value”, operator = “==”, value = “light”, isTrigger = true } } } The only code that's working is: But, this trigger is only for 2 devices, and I have a lot more.... And I don't like it because it's hard to maintain.. { operator = "any", conditions = { { type = "device", id = 45, property = "value", operator = "anyValue", isTrigger = true }, { type = "device", id = 46, property = "value", operator = "anyValue", isTrigger = true } } } Can someone help me with this? please!
  5. Hello, I created following scene that turn off all the lights in my apartment: This scene should be automaticly launched while button 2 is pressed 2 times on Dimmer in Lobby. But it's not launching. It is properly running by mobile app. Does anyone knows what I am doing wrong ? What to check ? Regards.
  6. Hi all, I would like to display a debug message with the time of sunset + an x amount of minutes. So there needs to be a calculation. I have a few scenes whose start is dependent of the month, turning lights on earlier or later. My debug message should be something like "today lights will be on at 21:15". That 21:15 is the calculated time. I have these declarations at the start of scenes: local sunsettime = fibaro:getGlobalValue("SunsetTime"); local sunsetHour = fibaro:getValue(1,'sunsetHour') But I can't figure out how to do this. Shouldn't be very complicated, but i'm not good in LUA programming with time. Hope someone can help me out.
  7. Version 1.2

    246 downloads

    If you've found yourself with too many Lua and Block scenes and need more automation, this QA is the right solution for you. The QA is designated to control and monitor your home system. QA automatically identifies the type of elements in the system. (Z-wave device, QA device, scene, automatic scene (Block and Lua). Any valid Z-wave device property and his value could be monitored, controlled and execute commands accordingly All-in-One QA supports custom events, active profile setup and controls alarm zones while every breached zone or sensor in the zone could be identified and execute actions accordingly. The first time you use All-in-One QA, jM {} hash table must be defined. Each line in the table has two mandatory and two optional fields. jM={ { 15, "137|630", {timeSlot={“12:00~18:00”},state="value=true", trueAct={“|230|”, “turnOn”,””}}} } Time span IDs list Criteria & Rules Action tables Time span a period of time (in minutes) within which some activity must be performed by device or scene. Additional two options could be defined: time span = 0 defines the line as activity only. time span = ‘negative number’ line is suspended (remarked) IDs list given list of devices/scenes/QA/global/keywords. Use under score for scene IDs. (“_45”). global variable – add an ampersand sign & to System, QA and Local variable names: &varName keyword – add a dollar sign $ to keyword variable: $name Note: To use & and $ characters for other purpose , add % after the character. Criteria & Rules (optional) property, state, time slot, active rules… Action tables (optional) tables of commands to be executed. To avoid using device IDs jS2n{} array could be defined. If device ID changed because of re-inclusion it requires to change ID in one place only. for example: jS2n= {boiler=137, dryer=630, light=230} device name must be included within back apostrophe sign in jM{} hash table. Now jM{} hash table above will look like that: jM={ { 15, "`boiler`|`dryer`",{timeSlot={“12:00~18:00”},state="value=true", trueAct={“`light`”, “turnOn”,””}}} } 1. Monitor option Some time the scenes or QA devices are stuck w/o any understandable reason. Some devices suddenly stop to send reports or don’t change state. In most of the cases we don’t aware about the problem till something goes very wrong. The monitor option will send an alert in case of defined states are timed out. Example to set watchdog timer for devices, scenes, QA devices, global variables and keywords jM={ {8, "_17|_545",{timeSlot=”10:00~22:00”}}, -- within every 8 min. between 10am to 10pm, scenes 17, 545 must be active. If not alert sent. {3,"134|618|_556|_588"}, -- within every 3 min. devices 134,618 and scenes 556,588 must be active. If not auto-alert sent. {10,”132|145”,{property=”power”}}, -- within every 10 min. devices in list must to report new power value. If not auto-alert sent. {30,”470”,{state=”power>10”}}, -- if device’s power greater than 10 over 30 minutes, auto-alert sent. {20,”&HomeStatus|$iDoor”}} -- if global variable HomeStatus or keyword iDoor didn’t change within 20 min., auto-alert sent. 2. Control option Execute actions based on device state, status or value changes. QA supports option like on-line calculations, time modifications, IF THEN and WHEN THEN statements and other features for fully home automation just with one QA (which even doesn’t trigger by the system). Following action tables are available: trueAct{} - executed when state status is true. falseAct{} - executed when state status is false. trigAct{} - executed on every value change at any mode, true or false timeoutAct{} - Disables auto-alert notification and executed when elapsed time exceeds time span. Time span counting restarted after state status back to true. timeLoopAct{} - Disables auto-alert notification and executed when elapsed time exceeds time span. Time counting restarted immediately. InitAct{} - Set of specific actions to be executed on startup only. errACt{} - Set of specific actions to be executed if verification failed. Here is an example of most common scenario, to turn on light when motion sensor breached and turn off light when sensor back to safe after few minutes (3 min. in this example) jM={0,”`mSensor`”,{state=”value=true”,trueAct={“`lightSw`”,”turnOn”,””},falseAct={“`lightSw`”,”turnOff”,”180”}}} Since no need to turn on light during the day, timeslot could be defined jM={0,”`mSensor`”,{state=”value=true”,timeslot=”18:00~07:00”,trueAct={“`lightSw`”,”turnOn”,””},falseAct={“`lightSw`”,”turnOff”,”180”}}} But now could be an issue to turn off the light, if sensor breached few seconds before end of timeslot and back to safe is out of defined time slot, falseAct{} won’t be executed. In this case, turning light off action should be part of trueAct{} table jM={0,"`mSensor`”,{state=”value=true”,timeslot=”18:00~07:00”,trueAct={{“`lightSw`”,”turnOn”,””},{“`lightSw`”,”turnOff”,”180”}}} Z-wave devices, global variables and keywords could be defined at several lines (no limit). Scene could be defined one time only. For more details please download AOQ Advanced User’s Guide - complete instructions and information AOQ Quick Guide – syntax format reference and examples AOQ HC-WebEye Viewer – AOQ browser viewer guide QA Advantages: Debug window view: On the first run follow information will be displayed at debugger During normal operation every executed command showed at debugger. following data shown for every command: jM line number: device name: state value and status by color (green - true | pink - false); command executed. The debug information has special tag "AOQ<QA-ID>" and "TRACE" / "WARNING" / "ERROR" type for filtering. AOQ table preview: Table's header includes: startup time stamp, script current version, scene Name, LED as displayed at HC3 front panel, sunrise/set hours. Current home mode (@home or @vacation) System's current profile mode. Elapsed time Total Z-wave events Min, average and max Z-traffic Table columns are: Type – device type (Z.Device, G. Variable, Keyword, QA, luaScene, blockScene). ID: Description – room name: device ID: device name. Z-wave devices sorted by rooms, then by device ID. Battery capable device have green background according to current battery level. If device included in alarm circle icon appears before name. green circle - armed, red circle - breached Value – items current value. Criteria – state of evaluation to determine true or false status. If formula included, the state displayed on green background. Last seen – elapsed time since last status change. Alert – by default this column isn’t shown. If any devices have been alerted the column will be shown. Please notice that in some cases the device could be alerted, but after while it could back to normal activity. For example, if motion sensor is breached over specified time-span, alert notification will be sent. But after a while the sensor back to safe and alert is canceled, “back to normal” notification will be sent. At header of alert column shown current number of alerts Time Span – time span to monitor state of items. If time span set to 0, then this line acts as activity, no timeout alerts reported. If time span set to negative number, this line is suspended and no actions executed. Time Slot – Time slot range to execute related actions. Timestamp to execute specific action at specific time. Active (in range) time slot shown in green fonts. trueAct – list of actions to execute when the state is true. falseAct – list of actions to execute when the state is true. trigAct – list of actions when the value changes timeoutAct – list of actions to execute when time-span reached. Timer will be restarted when device state changed again to true. timeLoopAct – list of actions to execute when time-span reached. Timer restarted immediately after actions table executions. initAct – list of actions to execute on QA startup. Active Rules – non default defined rules (initOnStartup, Vacation, timeSpanOn, onClock, lineState, trigAll) jM{#} - line number in jM{} hash table jM{ hash table line} – shows device location in jM{} hash table. At the bottom of the table two execution lines show: list of up to 60 last executed actions (in order of execution) are displayed. (like CNN news line). list of delayed commands to be executed (and time left to execute) All global variables, their values and last modification time shows below the table. Note: After downloading the QA, upload the file into HC3 While updating new version, please save your tables before (from line 1 up to line --== SAVE ABOVE SECTION BEFORE UPDATE ==) HC2 users migrated to HC3 and have used All-in-One Scene, just copy your jM{} and jS2n{} arrays, change device IDs and you're ready to go. Please note "setArm" and forceArm" commands not supported in HC3. Use alarm control commands.
  8. cag014

    All-in-One Scene

    Version 3.1

    1,519 downloads

    This script is designated to control and monitor your home system. Script automatically identifies the type of elements in the system. (Z-wave device, virtual device, scene, automatic scene (Block, Magic or Lua). Any valid Z-wave device property and his value could be monitored, controlled and execute commands accordingly. If you don’t want or need to use this script, but have issues with your system (like delays, z-wave devices don’t respond always, scene receives no triggers), it helpful to run this scene as is (without any changes) just to monitor and to identify z-wave “dead” and/or NACK occurrences in your system. You’ll receive on-line notifications about it. The first time you use All-in-One Scene, you will need to define jM {} hash table. Each line in table has two mandatory and two optional fields. jM={ { 15, "137|630",{timeSlot={“12:00~18:00”},state="value=true", trueAct={“|230|”, “turnOn”,””}}} } time span IDs list Criteria & Rules Action tables a) time span a period of time (in minutes) within which some activity must be performed by device or scene. Additional two option could be defined: I. time span = 0 defines the line as activity only. II. time span = ‘negative number’ line is suspended (remarked) b) IDs list given list of devices/scenes/VD/global/keywords. Use under score for scene IDs. (“_45”). a) global variable – add an ampersand sign & to global variable name: &varName b) keyword – add a dollar sign $ to keyword variable: $name Note: To use & and $ characters for other purpose , add % after the character. c) Criteria & Rules (optional) property, state, time slot, vacation mode… d) Action tables (optional) tables of commands to be executed. By defining String-to-number table which converts device name to ID jS2n= {boiler=137, dryer=630} jM{} above table will look like, device name must be included within back apostrophe sign. jM={ { 15, "`boiler`|`dryer`",{timeSlot={“12:00~18:00”},state="value=true", trueAct={“|230|”, “turnOn”,””}}} } 1. Monitor option There are so many times that scenes or Virtual devices are stuck w/o any understandable reason. Some devices suddenly stop to send reports or don’t change state. In most of the cases we don’t aware about the problem till something goes very wrong. The monitor option will send an alert in case of defined states are timed out. Note: In order to monitor virtual devices, fibaro:log() command must be included in main loop or in button’s code. For example, just add fibaro:log(“done”) at end of your main loop and VD could be monitored. Example to set watchdog timer for devices, scenes, virtual devices, global variables and keywords jM={ {8, "_17|_545",{timeSlot=”10:00~22:00”}}, -- within every 8 min. between 10am to 10pm, scenes 17, 545 must be active. If not alert sent. {3,"134|618|_556|_588"}, -- within every 3 min. devices 134,618 and scenes 556,588 must be active. If not auto-alert sent. {10,”132|145”,{property=”power”}}, -- within every 10 min. devices in list must report new power value. If not auto-alert sent. {5,”112”,{state=”value=true”}}, -- if device’s value is true over 5 minutes, auto-alert sent. (e.g. device stuck in breached state) {30,”470”,{state=”power>10”}}, -- if device’s power greater than 10 over 30 minutes, auto-alert sent. {20,”&HomeStatus|$iDoor”}} -- if global variable HomeStatus or keyword iDoor didn’t change within 20 min., auto-alert sent. 2. Control option This part of the script enables execution of actions based on device state or value changes. Script supports many options, calculations, time modifications, if statement and other features to do almost everything that you need to control your home just with one scene (which even doesn’t trigger by the system). Six action tables could be defined: (See AOS Advanced User’s Guide for more information.) trueAct{} - executed when state status is true. Please do not confused between state and value. If state defined as “value=false”, state status is true when value of device is false. falseAct{} - executed when state status is false. Please do not confused between state and value. If state defined as “value=false”, state status is false when value of device is true. trigAct{} - executed on every value change at any mode, true or false timeoutAct{} - Disables auto-alert notification and executed when elapsed time exceeds time span. Time span counting restarted after state status back to true. timeLoopAct{} - Disables auto-alert notification and executed when elapsed time exceeds time span. Time counting restarted immediately even if status remains true (no back to true change required). InitAct{} - Set of specific actions to be executed on startup only. Here is an example of most common wanted scenario, to turn on light when motion sensor breached and turn off light when sensor back to safe after few minutes (3 min. in this example) jM={0,”`mSensor`”,{state=”value=true”,trueAct={“`lightSw`”,”turnOn”,””},falseAct={“`lightSw`”,”turnOff”,”180”}}} Since no need to turn on light during the day, timeslot could be defined jM={0,”`mSensor`”,{state=”value=true”,timeslot=”18:00~07:00”,trueAct={“`lightSw`”,”turnOn”,””},falseAct={“`lightSw`”,”turnOff”,”180”}}} But now could be an issue to turn off the light, if sensor breached few seconds before end of timeslot and back to safe out of time slot, falseAct{} table won’t be executed. In this case, turning light off should be part of trueAct{} table jM={0,"`mSensor`”,{state=”value=true”,timeslot=”18:00~07:00”,trueAct={{“`lightSw`”,”turnOn”,””},{“`lightSw`”,”turnOff”,”180”}}} Same Z-wave device, global variable and keyword could be defined at several lines (no limit). Scene and Virtual devices could be defined one time only. Please download 1. AOS Advanced User’s Guide - complete instructions and information 2. AOS Quick Guide – syntax format reference and examples 3. AOS HC-WebEye Viewer Guide - AOS browser viewer guide 4. timeDrift – If you considering to use time drift correction, please download this scene and follow instructions at header. Script Advantages: No Lua or any software knowledge required. Supports time drift correction. (download timeDrift scene) Supports vacation and power outage modes. Provides excellent view of all devices, global and keyword variables at a glance, including: status, current value, up to 20 last values & executed commands. (Defined by dataRecord variable) Each command to be executed with current variable values is shown All items displayed by their names, including VD buttons in human readable format (not just IDs) At the bottom of the table up to 50 last commands in execution order are displayed (defined by cnnLine variable) Commands executed much faster than using system’s standard triggering mechanism (Lua, Block or Magic) No limits of scene’s “Max. running instances” Complex operation could be executed by newbie users (like experts). Anti-ripple delay could be applied. (change status after specific delay according to latest value) Actions could be executed by/from Scenes and VDs. Add/Change/Suspend any action in few seconds of work. Z-Wave traffic always monitored and summary of the traffic displayed. Dead and NACK occurrences of entire system immediately reported, recorded and notification sent to user. Repeated commands and device’s reports (RPT) of entire system are recorded and displayed. Global variables names, elapsed time from last change and their current values are shown. (Variables used in table) Details of all actions and commands are displayed in popup menus. Keeps Z-wave traffic low as possible by verifying device state before sending command. If device ID changed (excluded/included), user needs to update device ID in one place only! No extra jSON tables. Keeps your RAM load low All data displayed as a table where all configured devices and their related data displayed in human readable format. Extra button 'Refresh' will appear and covers 'Clear' button. Press ‘Refresh’ or ‘Start’ buttons to refresh table data. Table's header includes: startup time stamp, script current version, scene Name, LED as displayed at HC2 front panel, sunrise/set hours. System name – by hovering mouse over, system inventory shown Current home mode (@home or @vacation) system status - by hovering mouse over, last system's activities is shown Elapsed time Total Z-wave events - by hovering mouse over summary of all activities shown Min, average and max Z-traffic, by hovering mouse over CPU elapsed time shown By hovering mouse over column headers, quick guide is shown. Quick guide displayed during 5 minutes from startup. On every manual refresh, the guide displayed for next 5 minutes. Table columns are: Type – device type (Z.Device, G. Variable, V.Device, luaScene, blockScene, magicScene, Auto-luaScene, Auto-blockScene, Auto-magicScene). By hovering mouse over Z.dev type column, top active devices are shown. User configurable by setting topActive global variable. (0-30) default 15 ID: Description – room name: device ID: device name. Z-wave devices sorted by rooms, then by device ID. Battery capable device have green background according to current battery level. If device armed, alarm icon appears.By hovering mouse over, inventory of devices in jM{} table are shown. Value – items current value. By hovering mouse over, latest values, trigger value and command executed are shown. Criteria – state of evaluation to determine true or false status. If formula included, the state displayed in Italic fonts and by hovering mouse over, popup menu shows the formula and calculations Last seen – elapsed time since last status change. Alert – by default this column isn’t shown. If any devices have been alerted the column will be shown. Please notice that in some cases the device could be alerted, but after while it could back to normal activity. For example, if motion sensor is breached over specified time-span, alert notification will be sent. But after a while the sensor back to safe and alert is canceled, “back to normal” notification will be sent. At header of alert column shown current number of alerts Time Span – time span to monitor state of items. By hovering mouse over, maximum reached span time shown. If time span set to 0, then this line acts as activity, no timeout alerts reported. If time span set to negative number, this line is suspended and no actions executed. Time Slot – Active time slot range to execute related actions. Timestamp to execute specific action at specific time. trueAct – list of actions to execute when state is true. falseAct – list of actions to execute when state is true. trigAct – list of actions when value changes timeoutAct – list of actions to execute when time-span reached. Timer will be restarted when device state changed again to true. timeLoopAct – list of actions to execute when time-span reached. Timer restarted if state still true (no state changes required) initAct – list of actions to execute when scene started. By hovering mouse on actions cells, action’s details are shown In shown example for trueAct{} actions: a) time span of irrigation system calculated on line according to ambient temperature. min(max(floor(@47>value)-25,0)+10,18) b) TTS message announced (Garden Dripper has started) c) Irrigation is turned ON. The entire execution process is shown including all calculations, so user could see what exactly will happened. VacMode – vacation mode. In vacation mode by default timeSpan ignored and all Z-wave devices are converted to Activities, Scenes and VDs are not monitored. Non default vacation state could be defined in each line (vacation=”normal” or “stop”). Device index in jM{} hash table – shows device location in jM{} hash table. By hovering mouse over cells, device description, manufacturer, zwave version and JM{} line shown. At the bottom of the table list of up to 60 last executed actions (in order of execution) is displayed. (like CNN news line). If the device has same state as required by command, command isn’t executed and colored pink. Table color code: 1. Value, Criteria and Last seen columns green – state is true pink – state is false yellow – out of defined time slot, no actions or monitoring done. gray – line suspended. To suspend the line, set time-span to negative value. red - in alert-state, means this line exceeds time-span and auto-alert sent. 2. Time Slot black background and Suspended/Disabled label in gray means this line is inactive. Gray background and Activity label in green means the device assigned to control only. (Time span is zero). green background and red progress bar, device is monitored. On timeout auto-alert sent. blue background and purple progress bar, device is monitored and on timeout actions executed. (No alerts) If global variable in use, following table will be displayed Type – two types are available, Local and Global variable. Local means ‘global’ variable in use within the script (if global4local defined, those values are saved). Global is actual global variable of the system. Name – variable name Value – current variable value Modified – elapsed time since last change In case dead or nAck communication occurred following table will be displayed ID - device ID and his description is shown. nAck – number of “transfer failed” events occurred. Dead – number of “dead” reports received Is dead – current device dead status (true or false) Events history – last nACk and/or Dead events received and time-stamp of each event. Table of top active devices in your system is shown and could be used to analyze and reduce your Z-traffic. Up to 30 devices could be displayed by user configurable variable topZwave . Default is 15 ID - Since most of the devices has number of slaves, master device ID and his description is shown. By hovering on the line, slave devices and his number of events will be displayed. # – number of events occurred. % – Percentage of total events. In case reminders are active following table displayed: Rate – time interval to execute reminder RunTerms – triggers list to active reminder Note – send message as notification Reminder – reminder message By hovering mouse over “Run Terms” header, condition details displayed. Following actions are built-in : addRmd, logRmd, setRmd, delRmd, delAllRmd - reminders control disableScene, enableScene, startScene, killScene – scene control forceArm, setArmed – alarm control pressButton , setSlider, setProperty– virtual device control reboot, shutdown – system actions sendEmail, sendPush, sendiPush, sendPopup, sendNote, sendSms*, tts* – notification control setColor, setValue, turnOn, turnOff – Z-wave devices control setTimeSpan, setTimeSlot, setTimeDrift, timeSpanOn - time control setState, setStateValue, setStateDelay, setStateFormula -- parameters control vacOn, vacOff, powerOutage– special modes *not supported by the script. User defined functions. All valid actions or properties of any Zwave, Plugin or VD devices are fully supported also. By insert a new action in the tables, the action will be verified by the code and if it's valid will be in use. Special features If an error occurs during run time, it will be displayed on fixed type men. Scene will continue to run. By manual refreshing the table three times error is no longer displayed. When power outage mode activated, fixed menu displayed When vacation mode activated, fixed menu displayed As mentioned at the beginning, scene stuck without any reason and it’s true for this scene as well. To make sure that user will be notify if the scene is failed, weather triggers at the header of the script have been defined (these triggers exists by default at all systems and always work). When trigger received and the scene is failed, notification including last debug/error message sent to user. If autoRestart set to true, scene restarted automatically. Usually it takes awhile to receive weather trigger, so to speed up failure detection, recommended to add additional trigger (like motion sensor or any other device which is active often at your home) Please do not remove weather triggers… during normal operation all triggers are ignored. --[[ %% autostart %% properties %% weather Temperature Humidity Wind WeatherCondition --]] Using this script, I’m able to control over 95% percent of my needs, including irrigation system, heating system, bathrooms fans, all motion and door sensors, air conditioners and more. In my system then number of scenes reduced from 48 to 4 and virtual devices from 11 to 2. In addition my RAM consumption reduced from ~80% to 30%. The script has many options and features, so any action could be executed in several ways therefore please feel free to ask about implementation. The code is over 1,000 lines, but only ~15% of the code is actually running. Rest of the code is to display, initialize and to validate hash table data on startup. Code covers ~80 hash table syntax errors. Please read carefully displayed errors and follow instructions.
  9. Hi I recently figured out that my scenes with sending picture to e-mail from a ip camera not working anymore. It stops working around November 2017, I think after update to 4.150 or 4.140. Now running 4.170 on HC2 and command "sendPhotoToUser" not working. Button with camera logo on the device which used to send a snapshot to mail, also doesn't work. Has anyone else same issue? Code which should send a picture looks like this: Exactly the same code coming from block scene, when I making new scene now and converting to lua. --[[ %% properties 874 value %% weather %% events %% globals --]] local startSource = fibaro:getSourceTrigger(); if ( ( tonumber(fibaro:getValue(874, "value")) > 0 ) -- id 874 is triggering device or startSource["type"] == "other" ) then fibaro:call(648, "sendPhotoToUser", "2"); -- 648 is a camera id, 2 is a user id end Camera's settings and plugins/for cameras wasn't changed since this worked.
  10. Hi guys, I'm going mad with Fibaro GPS scene trigger which refuses to work although my movement traces from my mobile are sucessfully recorded within Fibaro. I have done/checked/tried: create a custom location in localisations panel instead of using my predefined HCL location using a separate variable instead of direct GPS location checked data privacy settings on my IOS and allowed it for Fibaro to collect GPS (otherwise traces would also not be visible in Home Center) Home location: Collected movement traces: Fibaro test scene: What else can it be?!? Note that I can trigger the scene manually and i get the notification. Also I can trigger the scene via IFTTT even location-based! Help much appreciated! Home-Center light is on latest version 4.560.
  11. Hi, I have some scenes that; for debugging reasons, contain also an action to send an e-mail. Normally I should be able, judging from the date/time this mail was sent to check if my scene is working correctly. If necessary I can compare the mail with the log. If the log says that sensor A saw movement at 3:30 in the night and then the lights went on, then there probably is no problem. The mail then has the content , for example "Scene 13 just triggered", and was sent at 3:30 in the night. But... I DO get these correct mails that prove that the scene is working correctly, from the type in the example mentioned, but at an other hour, completely at random, I get AGAIN the same mail and now without any trace in the log of a triggering event for the scene. So the scene was NOT triggered but the mail was sent anyway. Anybody else having this problem or a reason for this behaviour ?
  12. Hello, I want to make a scene that when mij motionsensor is armed and breached the light and siren are going to work. I made it but when my motionsensor is armed the light instantly goes on and the sirene goes loud. It does not work. Who can help me?
  13. Hei, Quick App - Sonos Zone Controller works great inside the controller bur how can i use it with scenes ? In scenes is is not possible to choose the quick app Thanks for your answer.
  14. Function Request: Within block scene, it would be good to have the option within Simple Message Block to select: Log Output as a drop down within Simple Massage Output type: Debug, Error, Warning, Trace Message This will allow people to send a message into the Log during the flow of the Block Scene.
  15. I can't get a scene to work if I add a time interval. It looks ok but is not working and I don't know what I do wrong. It works if I remove the Time Range block... Please help!
  16. Hello, Is it possible to change a scene icon in LUA? The scene is just a simple toggle: local switchState = tonumber(fibaro:getValue(59, "value")) == 1 if switchState then fibaro:call(59, "turnOff") else fibaro:call(59, "turnOn") end Thanks
  17. response, status = api.get("/scenes") fibaro:sleep(1000) if (status == 200) then fibaro:debug("Get Scenes Successful") created = true else fibaro:debug("Failed to get Scenes " ) end for _,s1 in ipairs(response) do local s2 = api.get("/scenes/"..s1.id) if s1.name == gSceneName then fibaro:debug("SceneName: " .. s1.name .. " Scene ID: " ..s1.id) print (s1.isLua) -- ** gets correctly print (s1.lua) -- <=== RETURNS a null --- HOW do I get this print (s1.roomID) -- ** gets correctly print (s1.iconID) -- ** gets correctly print (s1.sortOrder) -- ** gets correctly SceneID= s1.id fibaro:sleep(1000) Essentially I'm trying to get the Lua code from a scene so I jason encode it so I can then populate another scene with the same lua code. I'm trying to automatically update/create Lua scenes without having to go in and edit each one individually. I can populate the "lua " field with an API PUT ... But I can't read it back. The code above returns all the other fields but not the s1.lua Any help would be greatly appreciated - thanks.
  18. Hello. I don't know how to set up a scene for Fibaro HC lite to sort a picture when the door opens on the sepecified mail. For Fibaro HC2 I did this scene and it works perfectly. Unfortunately at Fibaro HC lite I have no opportunity to choose any room in the system, as I cannot appear to choose.
  19. Martin_N

    ikony_sceny.zip

    Version 1.0.0

    164 downloads

    File: ikony_sceny.zip Modified icons for most common HC3 scenes - blinds, lights, blinds + lights. Size 128x128px, PNG, transparent background. ikony_sceny.zip
  20. I have a smoke alarm (FireAngel ST-630 with Sprue Z-wave-module) which I would like to trigger switching off a relay when an alarm is given. Basically, there are two ways to make one device trigger another, associations or scenes. Using association has the advantage of being independent of the HC2 gateway, so that is what I was looking for at first. The supplier of the alarm tells me, however, that association will not work in this case, since the appropriate association group uses a "sensor notification reports and not a set command". I am a little out of my depth here, and would appreciate any comments. The complete documentation for the device is enclosed. There is no Fibaro template for this device, but I do not expect that to make a difference. Do you agree with the supplier that association to a switch or relay is not possible in this case? What is a good and simple way to set up a scene for this function: 'If smoke alarm on device xxx then set switch yyy to "off"?' Sprue-Z-Wave-Module-Developer-Pack-2017.pdf
  21. How to create a scene (graphic blocks/ lua) by following below, I need to turn on a light if the door opened(triggering the door sensor) "between" 6.pm to 6.am. ___if the door opened between 6.pm - 6.am, then light on___ thanks.....
  22. Hi all, in the Panels menu, Fibaro alarm, advanced tab, pre-defined actions: the first pre-defined action "PANIC" dissapeared. I added and deleted some of my own scenes into other actions, and once the PANIC action is no longer there... Does anyone has any idea how to get it back? Thanks, Cheers!
  23. Version 3.2

    1,973 downloads

    Netatmo Weather Station VD-scene standalone INTRODUCTION Netatmo Weather station VD-scene brings complete integration of Netatmo weather station to HC2 users including rain and wind gauges and support for more than one station. PREREQUISITES Fibaro Home Center 2 with firmware 4.160 or greater Netatmo Weather station FEATURES Complete integration of Netatmo weather station with HC2 including rain gauge and anemometer Support for multiple Netatmo weather stations Support for maximum 3 additional indoor modules Smart update system that follows Netatmo weather station cloud updates Completely independent installation does not require any more Weather State VD or Main scene FTBE Netatmo weather station measurements can be shown on Weather State VD and HC2 web GUI and mobile applications by means of Weather State VD and Weather provider plugin VD has built in multi-language support with 27 languages included (see APPENDIX 1 for the list). VD can use HC selected language or user can select any other available language. Easy setup for VD icons (on UHASTM compatible version is this even easier) Global variables are automatically added, monitored and repaired and does not require user intervention INSTALLATION Please check provided User Manual PACKAGE CONTENT Netatmo Indoor Base module VD (main) Netatmo Outdoor module VD Netatmo Additional indoor module VD Netatmo Wind sensor VD Netatmo Rain sensor VD Netatmo Weather station scene Set of icons for all VD's and scene User manual EN TERMS AND CONDITIONS Permission to use, copy, modify and distribute this software and its documentation for educational, research, personal use and non-profit purposes, without fee and without a signed licensing agreement is hereby granted, provided that the copyright notice, with "Terms and conditions" and "Disclaimer" appear in all copies, modifications and distributions. It is strictly forbidden to sell, rent, lease and/or lend this software for profit without prior consent from the Author. DISCLAIMER This software is provided by copyright owner "as is" and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the author and distributor be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. Fibar Group S.A. and their employees are not responsible for support of the ABC VD. Please contact the author Sankotronic, on the Fibaro Forum, for any questions or support required. VERSION HISTORY 3.2 - Corrected rain sensor code and cleaned some bugs in scene. Indoor modules corrected handling of CO2 measurement, improved updating code. 3.0 – This new version is completely redesigned and made independent. Does not require Main scene FTBE and Weather State VD anymore. Updating is now synced with Netatmo cloud so readings are always up to date. 2.0.2 – Code optimized and resolved some bugs Here is look of the Netatmo Weather set: Enjoy coding and your new Netatmo weather station VD-scene! Sankotronic
  24. I Cannot get the alarm system to send notifications when there is a breach in the sensors. i create a scene if for example the motion sensor is armed and breached then ..... (see photo) The phone show in the users page but do not show up here. Can someone help me please.
  25. I have a question regarding setting up my alarm with help of the scenes in the HCL. I have a scene where the alarm siren is triggered 60 seconds after the motion sensors are armed and breached. During this time (60sec) I have the time to disarm the motion sensors. But this does not stop the alarm siren to turn on as the disarming the motion sensors does not interfere with the scene. Once the motion sensors are breached it depends only on the time to trigger the alarm siren. So I would like to stop the alarm siren after the motion sensors are breached. I think I could achieve this if I could stop the scene after the motion sensors are breached. How can I stop or interfere with the scene in HCL? In scenes I can only start a scene and not stop. Are there any other solutions. Thank you very much.
×
×
  • Create New...