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


All-in-One Scene 7.2

   (2 reviews)

11 Screenshots

About This File

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:

  1. No Lua or any software knowledge required.
  2. Supports time drift correction. (download timeDrift scene)
  3. Supports vacation and power outage modes.
  4. 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)
  5. Each command to be executed with current variable values is shown
  6. All items displayed by their names, including VD buttons in human readable format (not just IDs)
  7. At the bottom of the table up to 50 last commands in execution order are displayed (defined by cnnLine variable)
  8. Commands executed much faster than using system’s standard triggering mechanism (Lua, Block or Magic)
  9. No limits of scene’s “Max. running instances”
  10. Complex operation could be executed by newbie users (like experts).
  11. Anti-ripple delay could be applied. (change status after specific delay according to latest value)
  12. Actions could be executed by/from Scenes and VDs.
  13. Add/Change/Suspend any action in few seconds of work.
  14. Z-Wave traffic always monitored and summary of the traffic displayed.
  15.  Dead and NACK occurrences of entire system immediately reported, recorded and notification sent to user.
  16. Repeated commands and device’s reports (RPT) of entire system are recorded and displayed.
  17. Global variables names, elapsed time from last change and their current values are shown. (Variables used in table)
  18. Details of all actions and commands are displayed in popup menus.
  19. Keeps Z-wave traffic low as possible by verifying device state before sending command.
  20. If device ID changed (excluded/included), user needs to update device ID in one place only! No extra jSON tables.
  21. 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.

Spoiler

Capture.PNG.2cf602b1b5b77aff03082f0f6d4d8291.PNG

 

Table's header includes:

Spoiler

Capture.PNG.7ceb7222a5e7ff0c8f7de4a5666599e6.PNG

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

Spoiler

Capture1.PNG.2cb031d0f47760f67d8371f251fe06df.PNG

Current home mode (@home or @vacation)

system status - by hovering mouse over,  last system's activities is shown

Spoiler

Capture.thumb.PNG.ab48fc18a9c0ea9985d105a8f0fa5432.PNG

Elapsed time

Total Z-wave events - by hovering mouse over summary of all activities shown

Spoiler

Capture.PNG.e6b3e1057c04b2c8cbf3912b98bbc666.PNG

Min, average and max Z-traffic, by hovering mouse over CPU elapsed time shown

Spoiler

Capture1.PNG.d6a6deea3600eb72df7308dd6f22778a.PNG

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.

Spoiler

Capture.thumb.PNG.28f6d92e7a35b84a97e495527952ea7b.PNG

 

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

Spoiler

Capture.PNG.8a834b9007c1b3cd7157616c12c27981.PNG

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.

Spoiler

Capture.PNG.6d2dbe3063ddebc10840137515f6b06f.PNG

Value – items current value. By hovering mouse over, latest values, trigger value and command executed are shown.

Spoiler

Capture.PNG.89db08ad331c4e1a063ee9cf4ac21f81.PNG

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

Spoiler

Capture3.PNG.554650ab6784a96d3619acee45635c3b.PNG

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

Spoiler

Capture1.PNG.12bb6d493ffe8e04f50ceb5400860956.PNG

 

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.

Spoiler

Capture.PNG.185dbb6b67cdb2fcfead716c2203e27f.PNG

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. 

Spoiler

Capture.PNG.c14e85b116f4f1161d34b1b524131c33.PNG

    By hovering mouse on actions cells, action’s details are shown

Spoiler

Capture1.PNG.54b50c4590e39e7fb50a74768b7782bc.PNG

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.

Spoiler

Capture2.PNG.d43dab95a22904a763e8c46ca6e9012e.PNG

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.

Spoiler

Capture.thumb.PNG.8038b15e1d5eeec9ecd3ee5619177e70.PNG

 

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)

Spoiler

Capture.PNG.76724ac546bab46c47977ec11ca96926.PNG

If global variable in use, following table will be displayed

Spoiler

Capture.PNG.ffdba5d5e7768646bfc03f5ff15c8aef.PNG

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

Spoiler

Capture.PNG.5d7264b3465dfadb84ff1f83454c99a5.PNG

    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

Spoiler

Capture.PNG.e4b5077dadf6460838876992be57a660.PNG

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:

Spoiler

Capture1.PNG.4ba9019e040d774d8c687a5422c7b5dd.PNG

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.

Spoiler

Capture2.PNG.078371da7096156c4beb7c9d0bad80e3.PNG

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.

Spoiler

RunErr.PNG.56fad7c180ab15b9db01d70fd9601222.PNG

When power outage mode activated, fixed menu displayed

Spoiler

pwrOut.PNG.b697502f56840d02eddd09968c7cc832.PNG

When vacation mode activated, fixed menu displayed

Spoiler

vacOn.PNG.55a6c05528069c8cea471ffc1ee1bf27.PNG

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.

 

 


What's New in Version 7.2   See changelog

Released

New features

  1. Notify only on one dead child (first reported by the system) of the same physical device.

  2. Added an option to compare multiple values in state definition using "==" operator. Not available for any other operators (< / > / = / <>) 

             {0,"`KeyFob`",{state="sceneActivation==1 or 2 or 3", trueAct= {“`Light`","turnOn"}}},

{0,"`temp`",{state="power==40 or 50", trueAct= {“`heater`","turnOff"}}},

 

             If the string is too long the full data won't be displayed in the table (only first 30 characters), but by hovering the mouse on the state in the table, full condition will be displayed.

  1. To disable dead reports on specific device set as follow

 

HC2/HCL set mark if dead to no in device configuration

 

HC3/HC3 Lite/Yubii Home unmark follow field in device’s Advanced configuration

 

 

Note: The “transfer failed” notification will continue to be reported as NACK in Dead Traffic data table.

 

  1. Added an option to use user-defined property in state when the property is not defined in device by adding "+" sign to property name.

 

                {0,”DevId”,”state=”+newProperty=true”….

 

 

Bugs Fix

  1. Time range in condition statement. ($24clock:value=08:00~10:00)

  2. Minor bugs fix.

Update procedure

In order to keep your configuration tables, copy/paste code from line

 --==================Copy form here for updates=====================      

to the end of the code

or save your configuration before an update.



User Feedback

Recommended Comments



@cag014

I have 5 external doors at my home and I want to turn ON Red light (in my living room) if one of the doors is open.

Could you suggest the best option to do it?

Edited by AR27690
Link to comment
Share on other sites

Guest cag014

Posted (edited)

There are a few options to do it and I'm not sure if my suggestion is the best. It depends on personal logic.

Here is my suggestion (including TTS "Door closed" please remove it if you don't have TTS or no need)

define at jS2n table your doors device IDs

jS2n={door1=100, door2=200,door3=300,door4=400,door5=500, redLight=600}

jM={0, "`doo1r`|`door2`|`door3`|`door4`|`door5`",{state="value=true",trueAct={"`redLight`","turnOn",""},

falseAct={{"|`redLight`|","turnOff","","{`door1`:value=false|`door2`:value=false|`door3`:value=false|`door4`:value=false|`door5`:value=false}"},

{"","tts","Doors closed","{`door1`:value=false|`door2`:value=false|`door3`:value=false|`door4`:value=false|`door5`:value=false}"}}}}

In general when any door opens, red light turns ON, if door closed and all other door are closed, red light turns OFF and TTS announce "Door closed"

Of course it could be done by using variable or using trigAct{} table and etc.

As I posted this solution, it gave me an idea to concatenate devices with same statement:

instead

 {`door1`:value=false|`door2`:value=false|`door3`:value=false|`door4`:value=false|`door5`:value=false}

do that

{`door1`,`door2`,`door3`,`door4`,`door5`:value=false}

Already implemented... will be part of next release

Thank you @AR27690

Edited by cag014
Link to comment
Share on other sites

Guest cag014

Posted (edited)

@AR27690

Sorry for a late response. Here is it:

1. define variable iDoor and set gVarName as system predefind global variable (in this example global variable name is "aosGlobal". iDoor init value is alway =0.(On scene startup)

global4local= {true,gVarName="aosGlobal",varArray={iDoor="init:0"}}

2. Copy following action lines:

jM={

{0,"&iDoor",{state="value>0",
      trueAct={"|`redLight `|","turnOn",""},
      falseAct={{"|`redLight `|","turnOff",""},{"","tts","Doors closed"}} }},

{0,"`door1`|`door2`|`door3`|`door4`|`door5`",{state="value=true",

initAct={"iDoor","setGlobal","&iDoor+1","{|$id:value=true|}"},

trueAct={"iDoor","setGlobal","&iDoor+1"},

falseAct={"iDoor","setGlobal","&iDoor-1"}}},

}

In general:

On startup initAct{} will set iDoor value accrding to doors state.

When door opened global variable iDoor=iDoor+1, when closed iDoor=iDoor-1.

If iDoor >0 then turn ON red light, if iDoor=0 then turn OFF red light.

 

Edited by cag014
Link to comment
Share on other sites

Guest cag014

Posted (edited)

If anyone has any question or suggestions, please visit

 

Edited by cag014
Link to comment
Share on other sites

Guest cag014

Posted (edited)

To all..

I'm about to release a new version which includes following changes/fixes.

Please let me know if you have any features to add or improvements.

Spoiler

Capture.thumb.PNG.8aa2c7529a3844c6f3c188954b8799da.PNG

 

New features
display reminder's time left to execute.
log and display delRmd/delLogRmd tts message
display activities at monitor view when no z-wave device defined
display tip text of reminder message in reminder's table
display value that triggered action in drop-down last actions menu
added state value comparison for string and time ranges {state="value>02:00"} {state="value=a~d"}
added range of value for conditional statements - "{$24clock:value=02:00~08:00}"
added range definition in months, days and week days. timeSlot="m=1~5;d=10~21;w=3~7"
added "poll" command 
added sceneActivation
added centralSceneSupport
added keywords:
   $mName - current full month name (e.g. September)
   $wName - current full week day name (e.g. Monday)
   $internet - internet status ("online" / "offline"). internet status verified on table refresh cycle. At monitor view verification disabled.
added ability to define number of top active slave devices in sub-menu. user defined range (0-30) default 10
added HC2 LEDs status display
added trigAll rule (true / false). Execute table commands on every device report. (even when value is the same)
added internet verification line in jM{} hash table.  
added top active master devices table. user defined range (0-30) default 10
added display delayed commands to be executed in buffer.
added RAM cleanup.
added device name  at command's drop-down menu.
added quick guide drop-down menu for each header in a table.

added popup message if new software upgrade available.

added popup warning message when Z-wave LED is constantly on.

 

Bug fix
Using wrong property of device (which isn't part of hash table) in formula causes Lua error w/o error description.
Display error description, if device not found in system (not at initMode only)
Lua error in VD room name if VD's button executed during initialization.
Occasionally device marked armed after disarm.
Manual table refresh occasionally doesn't respond.

 

Please let me know if you have any features to add or improvements.

 

Edited by cag014
Link to comment
Share on other sites

Is it possible to check if a dimmer is manually used ? i want to use the motion sensor to turn on the light for like example 180 seconds, but when the dimmer switch is used manually, the light should be on longer, like 30 minutes or so. and if the switch is used manually again, the light should return to the 180 seconds again (or shorter if possible); is that even possible with the AOS ?

Link to comment
Share on other sites

Unfortunately there is no way to identify how switch has been turned ON or OFF, by command or manually.

However you could define global variable to store how switch has turned ON or OFF.

One question to clarify what did you mean:

2 hours ago, Circumflex_sigma said:

Is it possible to check if a dimmer is manually used ? i want to use the motion sensor to turn on the light for like example 180 seconds, but when the dimmer switch is used manually, the light should be on longer, like 30 minutes or so. and if the switch is used manually again, the light should return to the 180 seconds again (or shorter if possible); is that even possible with the AOS ?

Is it means you switch lights OFF manually? In this case  you want to turn lights OFF  and everything goes back to default (breached by sensor (180 s.) turned ON manually (1800 s), right?

I'll post the solution after your answer.

Link to comment
Share on other sites

Yep, that's correct.

 

So if i walk in my hallway, the motion sensor is breached and the dimmer is turned on via a timer for 180 seconds, and resets itself on every movement (if even possible ofcourse).

If i press the S1 on the Dimmer, the timer is set to 1800 seconds.

If is press the S1 on the Dimmer again, it is back to 180 seconds.

 

Will this be even possible to do so via this way?

 

What i'm looking for is a function of the S1 of the dimmer is to override the motion sensor by setting it to a 1800 seconds timer with a single click; and if pressed again (1 click) the timer is back to 180 seconds again.

 

Edited by Circumflex_sigma
Link to comment
Share on other sites

Guest cag014

Posted (edited)

Yes , it possible. Example below based on dimmer where value>5 considered ON.

Please follow next steps:

Add devices names and IDs  with your real IDs. (in this example lightSw stands for light switch and mSense for your motion sensor)

jS2n={lightSw=424, mSense=823}

 

Add variable onState to the global array:

global4local= {false,gVarName="",varArray={onState="off"}}   

 

Add to jM hash table:

jM={

{0,"`lightSw`",{state="value>5",
    trueAct={{"onState","setGlobal","manual","{&onState:value=off}",false},{"`lightSw`","turnOff","1800","{&onState:value=manual}"}},
    falseAct={"onState","setGlobal","off"} }},

{0,"`mSense`",{state="value=true",
      trueAct={{"onState","setGlobal","auto","{&onState:value=off}"},{"`lightSw`","turnOn",""}},
      falseAct={"`lightSw`","turnOff","180","{&onState:value=auto}"},}},

}

Please notice that when you will start the scene and light is on, it will turned off in 3 minutes if sensor breached or 30 minutes if sensor safe

Based on your request, if the light turned ON by sensor then you cannot set ON by manual switch. You need to turn OFF and ON to set 30 minutes delay.

You can use follow line instead:

{0,"`lightSw`",{state="value>5",initAct={"`lightSw`","turnOff",""},
    trueAct={{"onState","setGlobal","manual","{&onState:value=off}",false},{"`lightSw`","turnOff","1800","{&onState:value=manual}"}},
    falseAct={"onState","setGlobal","off"} }},

 

It will turn light OFF on startup

Let me know if it works.

 

Edited by cag014
Link to comment
Share on other sites

Hello,

 

I switch Fiona from V1,1 to 2,0  ?

 

image.png.9e638e07ed45444a55fd8bdf6f4b12a4.png

 

Everthing looks fine LED's match to HC2, thats a nice add on. And if you compare the time you can see at the sunHours where  you can find me at the globe ☺️

 

cag014 many thanks for this improvements.

 

Now I have to look at the new possibilities of your AOS 2.0...

Link to comment
Share on other sites

How do I set this up on a HC3?

What goes where in the LUA scene? (DECLARATIONS/ACTIONS?)

 
 
 
 
 
 
 

ACTIONS)

Link to comment
Share on other sites

Hi cag014,

 

do you think that this scene perhaps might be able to help me sort out the long-existing problem of my system (see below) ?

I haven't had time to play with my HC2 for some months now, but I have to get back on track and finish setting it up at last.

 

Cheers!

 

image.png.2cdcf8f3a4b0c0ee51f949c5a356e863.png

Edited by johndeere
Link to comment
Share on other sites

No, this scene replaces Lua and block scenes in one QA and makes your life easier.

Your problem that listed devices are part of the routing tables, but the devices have deleted from the system.

You need to reconfigure mesh network in the system.

By the way this Warnings should not cause any significant issues in the system. Mesh reroutes on line available route.

Link to comment
Share on other sites

hello cag014

Thank you for the scene!

There are two things I don't understand and there is / was a problem that unfortunately nothing has really solved so far. (unfortunately we can't ask for help)

Can you help me?!

The biggest problem is that there are 4 Ir extenders, 1 of which writes 2 communication errors quite a few times. "Refreshed, everything goes on without errors. , but when you click on it, it comes to your senses in the first place. At first I thought it was lime. ) to see if it gets better that way, maybe it got better but not much.

This means as you write (although I'm not very knowledgeable) it writes an error for the transmission, but then it writes that it has been fixed.

The other weird thing is that a motion sensor about 3 meters from the HC2 also writes a faulty transmission.

How can I find out what the problem might be?

[DEBUG] 14:27:03: 22-Dec 13:08 AOSv5.0 All-in-One scenes    O O O O O ? ? ?    sunHours 07:25~16:05
 
NorberHome@Home system status. 0d,01:19:02 1178 zEvents 5.3sMin 4.0sAvg 2.7sMax
Type Item Description Value Criteria in State TimeSpan Time Slot trueAct falseAct trigAct timeoutAct timeLoopAct initAct Active Rules jM{#} jM { hash table line }
K.Word $HC2onLine true value=true 01:19:00 Activity   tts tts           >2 {0, "$HC2onLine"...}
$RAM 28 value>85 01:19:00 Activity   sendNote setStateValue setStateValue sendNote       setStateValue   >1 {0, "$RAM"...}
$internet $internet value=online 01:19:00 Activity       tts         >3 {0, "$internet"...}
 

Dead traffic report: total 68 dead events.
Name :ID: Room nAck Dead Is dead Events history
Wc Rezgés:350:Wc 2   false (nack 13:38)
ElőtérReléMaster:381:Előtér 2   false (nack 13:37)
UdvariLámpaRelé:385:ElsőUdvar 2   false (nack 13:37)
Udvar Pára:400:ElsőUdvar 4   false (nack 13:50)
Wc Elmozdulás:351:Wc 2   false (nack 13:38)
1.BejáratLámpaRelé:384:Előtér 2   false (nack 13:37)
Udvar Fény:399:ElsőUdvar 4   false (nack 13:50)
Relé Hődetektor:383:Előtér 2   false (nack 13:37)
Wc Mozgás:347:Wc 2   false (nack 13:38)
4.IR hő:402:Pinceház 6 1 false (nack 13:53)(nack 14:07)(nack 14:08)(connection 14:08)(wkUp 14:08)
4.IR fan mode:404:Pinceház 6 1 false (nack 13:53)(nack 14:07)(nack 14:08)(connection 14:08)(wkUp 14:08)
Távirányító Udvari L:382:Előtér 2   false (nack 13:37)
Wc Fény:349:Wc 2   false (nack 13:38)
4.IR operating mode:403:Pinceház 6 1 false (nack 13:53)(nack 14:07)(nack 14:08)(connection 14:08)(wkUp 14:08)
4.IR set point:391:Pinceház 6 1 false (nack 13:53)(nack 14:07)(nack 14:08)(connection 14:08)(wkUp 14:08)
Udvar Hő:398:ElsőUdvar 4   false (nack 13:50)
Udvar UV:401:ElsőUdvar 4   false (nack 13:50)
Udvar Mozgás:397:ElsőUdvar 4   false (nack 13:50)
Wc Hő:348:Wc 2   false (nack 13:38)

Data table auto-refresh, every 240 seconds. 0
 

you may also be able to provide some information about GPS operation and application.?!

Thanks,

Link to comment
Share on other sites

Guest cag014

Posted (edited)

The "nack" as you understand means that controller didn't receive a feedback within specified time ..

if after three tries there is no feedback the device defined as dead device in controller, but if device response (after delay) or send a new data then it backs to normal.

In addition the AOS has wakeup dead mechanism  and every period of time which defined by parameter wakeUpRate  it wakes the device in controller (means the device status changed from dead to normal even if the device is still dead).

Regarding your motion sensor based on my experience, follow steps could help:

1. Turn off/on the device. In this case just remove the battery and connect again.

2. replace battery.

3. Try to change physical location of the device (even by few centimeters or just change the angle)

 

What do you mean by GPS operation?

I do have intentions to add GPS option to AOS using GeoFenceEvent  (in the near future)

 

Edited by cag014
Link to comment
Share on other sites

635 / 5000
Hello
then you mean to run this scene continuously and it solves the problem in principle ?! (I yelled yesterday, today by the time I got home 2 IR extenders had already written a communication error) the motion sensor was "de-energized". Thanks! Gps: Pretty rhapsodic on the phone using scenes. The fibaro app just worked sometimes sometimes, but the home center isn’t very much. though ... as if something had happened because it worked quite well yesterday and today. unfortunately I couldn’t try it in a scene because it’s evening / night. it doesn't show anything in the family panel, who went where. yesterday seems to be, but today again nothing .....
Link to comment
Share on other sites

hello cag014,

one more comment :)

the scene sends a push message! (?)
just because he’s practically bombarding my mom’s phone with push messages when he wakes up the “ominous” Ir extender, which often runs into a communication error.
the question is, can i change this somewhere? I mean, the ID of the device for which I want to receive notifications? or maybe not send it in a push message, but in a mail ....

grateful thanks for the scene so the IR extender communication problem seems to be solved. thank you very much!

Link to comment
Share on other sites

Guest cag014

Posted (edited)

You have several option to fix the problem. By default when you use sendPush action, push notification sent to all available users in the system.

You can limit the number of users which will receive the notification by:

1. Use sendPush with mobile ID - "sendPush,730,800....."

2. You can set in HC2 Access Control panel, which mobiles can receive push notification by default

 

Spoiler

image.thumb.png.1605456bbe83b2f123b9f347458fd49c.png

 

 

 

Edited by cag014
Link to comment
Share on other sites

Hello

Thanks!
although everything is set on the HC2 control panel.
Notifications are coming now, but their content is not displayed. I am slowly concluding that Huawei mobiles are causing the problem ....

Link to comment
Share on other sites

hi cag014

the problem is solved .... you can "stone myself" :)
it never crossed my mind that restarting HC2 would solve the problem .... so, in my final desperation, I restarted HC2 and it works .... the notifications come where I want to go.

grateful thanks for the many help!

I wish you a happy new year, you !!!!

Link to comment
Share on other sites


Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...