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


cag014

All-in-One Scene: How to do it Better

Recommended Posts

  • Topic Author
  • Sorry, for testing have used new version, my mistake.

    Your version doesn't supports Keywords as part of conditional parameters.

    So for now please replace $timeSpan to 30 in conditional parameter.

    {30,"245",{state="value=true",timeLoopAct={{"Warnung!","sendPush,542","$name in der Toilette ist über $timeSpan Minuten offen","{79:value<15|$id:lastBreached<?30*60+(30/10*60)?}"},{"518","pressButton,1","", "{79:value<15|$id:lastBreached>?30*60+(30/10*60)?}"}}}},

    or

    as part of new release improvement find follow lines (somewhere around line 218 in your scene)

    dState,logTxt=ref..o.." "..doTheMath(rVal,inId,"parse"),logTxt.."  "..findNameRoom(inId,3)
     val=doTheMath(rVal,inId);lStatus=false

    and change inId to dId

    dState,logTxt=ref..o.." "..doTheMath(rVal,dId,"parse"),logTxt.."  "..findNameRoom(inId,3)
           val=doTheMath(rVal,dId);lStatus=false

     

    and it should work with $timeSpan in conditional parameter

    Edited by cag014
    • Thanks 1

    Share this post


    Link to post
    Share on other sites

    Hello,

     

    some more Info to the push messages:

     

    Please login or register to see this spoiler.

     

    The log shows only one device number. In the Info screen all numbers are right. Or ist it only possible to send a push message to one device? But I see also some eventually critical letters in the device names.

     

    Please login or register to see this link.

     :

    The Push messages will only send to the iPad. Every other mobile phone won't receive the push messages (iPhone or Android). With my other alarm scripts I receive the push massages with every device. Could this possible? 

     

    Perhaps this helps for bugfixing.

    Manuel

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • I'm using interactive push notification... in your alarm script what type of push message you're using?

    In new release I'm adding the standard push notification as well.

    Thanks for your helpful info.

    Share this post


    Link to post
    Share on other sites

    I use following code:

     

    fibaro:call(DEVICEID, "sendPush", "Push text blablabla");    

     

    Now I have move this code with a loop into a VD. Your AIO Scene will press the VD button so I can send the message to all devices.

     

    Please login or register to see this spoiler.

     

    • Thanks 1

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • That's what I thought... Fibaro has issue with interactive push, sent to admin only.

    As I said in new release this type of push will be supported.

    Thanks again

    Edited by cag014
    • Thanks 1

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Just to save your time... by using VD and you're not going to use interactive push ( at least till new release)

    find follow line (somewhere line 736)

           if not logInfo then api.post('/mobile/push',{["mobileDevices"]={tonumber(i)},["message"]=body,["title"]=subject,["category"]='RUN_CANCEL',["data"]={["sceneId"]=__fibaroSceneId}}) end end  

     

    and change it to

           if not logInfo then fibaro:call(tonumber(i),"sendPush",subject.."\n"..body) end end  

     

    Let me know if it works for you.

     

    Edited by cag014
    • Thanks 1

    Share this post


    Link to post
    Share on other sites

    Hello,

     

    thank you for this part of code. I have test All-in-One SceneV1.1 and it now it sends push message to the users phones. 

     

    The reason is like you describe above. In our family all smart phones have an own Fibaro user and the iPad uses the administrator to view the complete smart home. We all uses the "old" App.

     

    Thank you Manuel

    • Like 1

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Same configuration in my family also, interesting, looks like we're thinking in same direction.

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • A new version has been released (v2.0).

    This release supports

    1. All actions and properties  of any device on the market. In addition plugins and virtual devices have full support also.

    2. sceneActivation and centralSceneSupport are available for use:

    i.      sceneActivation - when this property in use the value should be the keyID. (e.g. sceneActivation=3).

    ii.      centralSceneSupport – although the trigger name is CentralSceneEvent, property name is centralSceneSupport. Property’s value is [keyId] [dot] [keyAttribute] (e.g. centralSceneSupport=3.Pressed)

    Implementation options:

                    a. Define line for every keyID or for every combination of keyId.keyAttribute in jM{} hash table.

    Please login or register to see this code.

    b.  Define one line in jM{} and use conditional parameter. Action tables trigAct{} or falseAct{} could be in use.

     

    Please login or register to see this code.

     

    c.  Define one line in jM{} without using  state and use conditional parameter. Only trigAct{} table in use. trigAll rule must be applied.

     

    Please login or register to see this code.

     

    New features

    1. added an option to create a group of devices. (real IDs or alias names)
      • jN2s={armDev="570|`mainDoor`|870", mainDoor=647} use in:
      • trueAct={"`armDev`",forceArm",""}, falseAct={"`armDev`","setArmed,0",""}
    2. display reminder's time left to execute.
    3. log and display delRmd/delLogRmd tts "deletion reason" message
    4. added drop-down menu to display 'translated' text of reminder message in reminder's table
    5. display value that triggered the action in 'actions history' drop-down menu
    6. added state value comparison for string and time ranges {state="value>02:00"} {state="value=a~d"}
    7. added range of value for conditional statements - "{$24clock:value=02:00~08:00}"
    8. added option to define range for months, days and week days. timeSlot="m=1~5;d=10~21;w=3~7"
    9. added option to replace any part of the timeSlot. {"`light`>5","setTimeSlot","08:00~10:00=11:00~12:00"}
    10. added "poll" command  
    11. added sceneActivation functionality
    12. added centralSceneSupport functionality
    13. 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.
      •    $timeLoop - dummy keyword to execute delayed action (like turning off lights, heating, arming alarm and etc.) after certain amount of time.
    14. added ability to define number of top active slave devices in sub-menu. user defined range (0-30) default 10
    15. added top active master devices table. user defined range (0-30) default 10
    16. added HC2 LEDs status display (same as on HC2 front panel)
    17. added trigAll rule (true / false). Execute table commands on every device report. (even if the value is the same)
    18. added internet verification line in jM{} hash table.  
    19. added row to display delayed commands to be executed (In buffer:).
    20. added RAM cleanup.
    21. added time stamp(s)menu of alerts occurrences.
    22. added device and action table names in command's details drop-down menu.
    23. added quick guide drop-down menu for each header in a table. Quick guide and command's details menus will be displayed during 5 minutes only. Every manual table refresh will restart menus display for next 5 minutes.
    24. added popup message if new software upgrade available.
    25. added popup warning message when Z-wave LED is constantly on.
    26. added "Active Rules" column to display non-default activated rules of the line. (Green - rule set to true and Pink - false)
    27. added support for plugins
    28. added "setStateFormula" command. Sets formula for state on-line calculation.
    29. sendPush is now simple push notification, and sendiPush (interactive notification) has been added.
    30. added an option to define scene 'to run' for sendiPush and sendPopup notifications. "sentiPush,run525" (run scene 525).
    31. added open use for any valid action of any device. (Z-wave, PlugIn or Virtual Device)
    32. added "else" option to condition statement.
    33. added full support to virtual devices (setSlider, pressButton, setProperty). Values and last modification time of slider or label could be retrieved and trigger actions..
    34. added drop-down menu of 'monitor view' to the table, by hovering over 'system status'. Stand alone monitor view has been cancelled.
    35. added an option to runAction, to define specific command(s) in array to execute.
    36. "23>2","runtAction,1,3","trueAct". execute commands 1 and 3 in trueAct{} array of device 23 at jM line 2
    37. If an error(s) displayed (red menu on bottom right side), by triple manual table refresh the menu won't be displayed (till next error occurrence)

     

    Bug fix

    1. Using wrong property of device (which isn't part of hash table) in formula causes Lua error.
    2. Display error description, if device in use not found in system
    3. Lua error in VD room name, if VD's button executed during initialization.
    4. Occasionally device marked armed after disarm.
    5. Manual table refresh occasionally doesn't respond.
    6. Error when room or device names have minus '-' sign   (like:    Pool-pump)
    7. Unable to use system's global variable includes under score '_'  (like:    Alarm_status).

     

    Edited by cag014

    Share this post


    Link to post
    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
    Reply to this topic...

    ×   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...