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



jgab

Recommended Posts

Jan thanks will go for it after my memory problem is solved.

HC3 restarts because 1% memery free.

I have no idea what Fibaro is doing or did I never have seen this before.

Jan can ER4 do 

Please login or register to see this code.

Lets say every 5 days but a lot off times after eacg other to clear history to get somememory back

Manually I did in browser 50 times and going down from 99% >>>92% as long as it stays on that level.

Thanks for your support,

//Sjakie

Link to comment
Share on other sites

Flott Jan, thanks for your help. Working fine and ready for the cold months ahead. Fantastic program and good fun to work with.  Takker

 

Link to comment
Share on other sites

  • Topic Author
  • On 10/2/2021 at 3:14 PM, Sjakie said:

    Jan thanks will go for it after my memory problem is solved.

    HC3 restarts because 1% memery free.

    I have no idea what Fibaro is doing or did I never have seen this before.

    Jan can ER4 do 

    Please login or register to see this code.

    Lets say every 5 days but a lot off times after eacg other to clear history to get somememory back

    Manually I did in browser 50 times and going down from 99% >>>92% as long as it stays on that level.

    Thanks for your support,

    //Sjakie

    Have you tried

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    Great Jan thanks!!

    was 72/45 after 20 hours

    now 62/40 after 5 minutes

    HC3 was always on 38 so something changed I didt modify or added some new stuff.

    Okay I know 2% differnce ist much but it is growing!

    Thanks again,

    //Sjakie

    Link to comment
    Share on other sites

    Jan,

    Please login or register to see this code.

    If I restart HC3 after your beautifull rule the effect is bigger.

    How to extend your rule HC3 will restart? I couldt find it in the thread here.

    Thanks,

    //Sjakie

    Link to comment
    Share on other sites

    On 7/10/2021 at 2:35 PM, jgab said:

    I have updated iOSLocator.fqa (v0.2)

    Please login or register to see this attachment.

    It is not really a EventRunner QA but it is a nice helper.

     

    QuickAppVariables

    • HomeVar
      Defaults to 'iOSHome' and is the name of the global variable where home status is stored.
      Possible values: 'all_home', 'all_away', 'some_home', 'unknown' 
    • UserLocVars
      User names and the global variables to store their state in 
      Ex. 'Bon:BobLoc,Ann:AnnLoc'
      will store Bob's status in global 'BobLoc', and Ann's status in global 'AnnLoc'
    • LocationsVar
      Defaults to 'iOSLocInfo'
      Is the name of the global variables where all location info for users are stored
    • HomeName
      Defaults to 'Home'
      Name of the place home. To avoid that home is logged as the HC3 name...
    • AwayName
      Defaults to 'Away'
      Name of the place away from a location

    The QA uses the defined locations, defined in the general/location panel

    Inside the QA a table 'USERS' need to be defined

    Ex.

    Please login or register to see this code.

    'User' is username - should be without spaces and strange characters (used in global variable name)
    'home' is true if user is part of people that live at home - used to decide if all at home etc.
    'device' is name of iDevice, matches so "iPhone" mathes 'Jan's iPhone'.

    'id' is the HC3 user id
    icloud.user is icloud username
    icloud.pwd = is icloud password

     

    Besides setting the global variables - that works for any user, not only HC3 users. If the 'id' field is set to a HC3 userID a GeofenceEvent will be emitted when user enter and leave locations, similar to the builtin geolocation function.

     

    If id is set you can capture it with a rule like

    Please login or register to see this code.

    if not you can use the global variables

    Please login or register to see this code.

     

    Hi Jan

     

    I'm trying to get iOSLocator up running in my environment.

    And I am a bit challenged here 🙈

     

    First - would it work, when i am using two factor authentication in icloud?

     

    I need to configure two places - right ?

    In the Variables fane, and Edit the Local users Section in the code

    Please login or register to see this code.

     

    Please login or register to see this attachment.

     

    I'm a little unsure how to use the UserLoCVar and "Local users" in combination?

     

    and i looks like im not connected to icloud

    Please login or register to see this image.

    /monthly_2021_10/2021-10-09_12-09-47.png.8ba9033c910637f5a857e49674d93a32.png" />

     

     

    Please login or register to see this spoiler.

     

     

     

     

     

     

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • 6 hours ago, ChristianSogaard said:

    Hi Jan

     

    I'm trying to get iOSLocator up running in my environment.

    And I am a bit challenged here 🙈

     

    First - would it work, when i am using two factor authentication in icloud?

     

    I need to configure two places - right ?

    In the Variables fane, and Edit the Local users Section in the code

    Please login or register to see this code.

     

    Please login or register to see this attachment.

     

    I'm a little unsure how to use the UserLoCVar and "Local users" in combination?

     

    and i looks like im not connected to icloud

    Please login or register to see this link.

     

    I think it works with 2-factor. It's an OATh API used.

    In the log does it say that it gets data for your user? You stopped the log short of when the interesting stuff happens....

    Link to comment
    Share on other sites

    6 hours ago, Oddi_78 said:

    Yes, I have to share how I did it. My daughter uses a windows pc now, but when it becomes available I will show you. I have made two TTS scenes, one for Norwegian and one for English. I have also made 2 scenes for sound effects (playing mp3 filet), one for each of the 2 sonos speakers. The 2 TTS scenes listen to a global variable and the same with the TTS scenes. So when I create scenes with TTS and the Sound Effect I just set the variables and the 4 engine scenes take care of Sonos TTS and sound effects

     

    53 minutes ago, jgab said:

     

    I think it works with 2-factor. It's an OATh API used.

    In the log does it say that it gets data for your user? You stopped the log short of when the interesting stuff happens....

    The log is complete. it just continues with

    [09.10.2021] [19:58:49] [TRACE] [QUICKAPP1260]: iOSLocator, deviceId:1260
    [09.10.2021] [19:58:49] [TRACE] [QUICKAPP1260]: iOSLocator, deviceId:1260
    [09.10.2021] [19:58:50] [DEBUG] [QUICKAPP1260]: Event:start 
    [09.10.2021] [19:58:50] [TRACE] [QUICKAPP1260]: Global variable for home status: iOSHome
    [09.10.2021] [19:58:50] [TRACE] [QUICKAPP1260]: Global variable for all location status: iOSLocInfo
    [09.10.2021] [19:58:50] [TRACE] [QUICKAPP1260]: Global variable for user: 'Ann' is 'AnnLoc'
    [09.10.2021] [19:58:50] [TRACE] [QUICKAPP1260]: Global variable for user: 'Bob' is 'BobLoc'
    [09.10.2021] [19:58:50] [TRACE] [QUICKAPP1260]: Name of home place: 'Home'
    [09.10.2021] [19:58:50] [TRACE] [QUICKAPP1260]: Name of AWAY place: 'Away'
    [09.10.2021] [19:58:50] [DEBUG] [QUICKAPP1260]: Event:setupLocations 
    [09.10.2021] [19:58:50] [TRACE] [QUICKAPP1260]: Home set to 'HC3-00002517'
    [09.10.2021] [19:58:50] [DEBUG] [QUICKAPP1260]: Event:setupLocations 
    [09.10.2021] [19:58:50] [DEBUG] [QUICKAPP1260]: Event:getIOSdevices Christian
    [09.10.2021] [20:00:20] [DEBUG] [QUICKAPP1260]: Event:getIOSdevices Christian

    Link to comment
    Share on other sites

  • Topic Author
  • Usually there is some kind of success or error log after "Event:getIOSdevices Christian".

    Or does the QA crash and restart?

    Link to comment
    Share on other sites

    1 hour ago, jgab said:

    Usually there is some kind of success or error log after "Event:getIOSdevices Christian".

    Or does the QA crash and restart?

    Seems to run "perfect"

    09.10.2021] [21:40:20] [DEBUG] [QUICKAPP1260]: Event:getIOSdevices Christian
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: iOSLocator, deviceId:1260
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: iOSLocator, deviceId:1260
    [09.10.2021] [21:40:59] [DEBUG] [QUICKAPP1260]: Event:start 
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: Global variable for home status: iOSHome
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: Global variable for all location status: iOSLocInfo
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: Global variable for user: 'Bob' is 'BobLoc'
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: Global variable for user: 'Ann' is 'AnnLoc'
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: Name of home place: 'Home'
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: Name of AWAY place: 'Away'
    [09.10.2021] [21:40:59] [DEBUG] [QUICKAPP1260]: Event:setupLocations 
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: Home set to 'HC3-00002517'
    [09.10.2021] [21:40:59] [DEBUG] [QUICKAPP1260]: Event:setupLocations 
    [09.10.2021] [21:40:59] [DEBUG] [QUICKAPP1260]: Event:getIOSdevices Christian
    [09.10.2021] [21:42:29] [DEBUG] [QUICKAPP1260]: Event:getIOSdevices Christian
    [09.10.2021] [21:43:59] [DEBUG] [QUICKAPP1260]: Event:getIOSdevices Christian

    Edited by ChristianSogaard
    P
    Link to comment
    Share on other sites

    16 hours ago, ChristianSogaard said:

    Seems to run "perfect"

    09.10.2021] [21:40:20] [DEBUG] [QUICKAPP1260]: Event:getIOSdevices Christian
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: iOSLocator, deviceId:1260
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: iOSLocator, deviceId:1260
    [09.10.2021] [21:40:59] [DEBUG] [QUICKAPP1260]: Event:start 
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: Global variable for home status: iOSHome
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: Global variable for all location status: iOSLocInfo
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: Global variable for user: 'Bob' is 'BobLoc'
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: Global variable for user: 'Ann' is 'AnnLoc'
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: Name of home place: 'Home'
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: Name of AWAY place: 'Away'
    [09.10.2021] [21:40:59] [DEBUG] [QUICKAPP1260]: Event:setupLocations 
    [09.10.2021] [21:40:59] [TRACE] [QUICKAPP1260]: Home set to 'HC3-00002517'
    [09.10.2021] [21:40:59] [DEBUG] [QUICKAPP1260]: Event:setupLocations 
    [09.10.2021] [21:40:59] [DEBUG] [QUICKAPP1260]: Event:getIOSdevices Christian
    [09.10.2021] [21:42:29] [DEBUG] [QUICKAPP1260]: Event:getIOSdevices Christian
    [09.10.2021] [21:43:59] [DEBUG] [QUICKAPP1260]: Event:getIOSdevices Christian

    Hi Jan

     

    Any thoughts how to extend to logging or where I can start searching?

    Link to comment
    Share on other sites

  • Topic Author
  • 42 minutes ago, ChristianSogaard said:

    Hi Jan

     

    Any thoughts how to extend to logging or where I can start searching?

    You should be able to run it in my emulator.

    In 

    function EVENTS.getIOSdevices(ev) 

    there is a http request.

    Set a breakpoint in the error and the success handler and see what you get, if you get something.

    Link to comment
    Share on other sites

     

    Hi, please advise:

    I have HC3, fibaro motion sensor, fibaro radiator head, I want to write it in EVENT RUNNER 4

    When the movement is disturbed, I want the temperature to be set to 25 at the head

     

     

      HT = { 
         _Kancel_pohyb = 207,
         _Kancel_hlavica_ = 332,
      }
     

     

    rule("_Kancel_pohyb:breached => _Kancel_hlavica_:fibaro.call(332, 'setHeatingThermostatSetpoint', 30)")  
     

    Please login or register to see this code.

    Please login or register to see this code.

     
     
    Link to comment
    Share on other sites

  • Topic Author
  • Please login or register to see this code.

    or, maybe simpler

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    Please login or register to see this code.

    Please login or register to see this code.

    rule("_Kancel_pohyb:breached => _Dielna_hlavica_:heatingThermostatSetpoint = 22.5")
    rule("trueFor(00:30,_Kancel_pohyb:safe) => _Dielna_hlavica_:heatingThermostatSetpoint = 18"
    • Like 1
    Link to comment
    Share on other sites

  • Topic Author
  • Please login or register to see this code.

    So, this is a trick if you want a smoothed value instead of a jumpy value - ex. a power value.

    The value given to the smoothFilter functions is the number of values change the average should be calculated for (sliding window)

    The rule variable 'power11' is declared a triggerVar so it can be used to trigger other rules when it changes value. It's not really a "sliding average" but an approximation calculated without any buffer - that's why we call it a "smoothed" value....

     

     

    Link to comment
    Share on other sites

     

     

    Please login or register to see this code.

    HC3 + EventRunner 4
     HT  = {  
    PriemerTempVonku = {380,37,28},
    LUAscena = 159
     }
    LUAscena - je scéna, ktorá beží ako LUA na HC3
     
    pravidlo ( "súčet(PriemerTempVonku:temp)/veľkosť(PriemerTempVonku) <= 10 = > ************************************ ********* " )

    Please login or register to see this code.

    fibaro . scéna ( 'execute' , {[ 1 ] = 159 , })    
     
    Toto pravidlo by malo povoliť túto scénu LUA.
    Potom potrebujem druhé rovnaké pravidlo, ale podmienka bude > 10, takže LUA vypne scénu
    pravidlo ( "súčet(PriemerTempVonku:temp)/veľkosť(PriemerTempVonku) > 10 = > ********************************* ********" )
     
     
    EDIT: sorry i fixed it:  PriemerTempVonku = {380,37,28}
    Edited by budu
    error in text
    Link to comment
    Share on other sites

  • Topic Author
  • 10 minutes ago, budu said:

     

     

    Please login or register to see this code.

    HC3 + EventRunner 4
     HT = { 
    PriemerTempVonku = 48,
    LUAscena = 159
     }
    LUAscena - is a scene that runs as LUA on HC3
     
    rule("sum(PriemerTempVonku:temp)/size(PriemerTempVonku) <= 10 = > ****************************************")

    Please login or register to see this code.

    fibaro.scene('execute', {[1] = 159, })
     
    This rule should enable this LUA scene.
    Then I need a second rule of the same only the condition will be > 10 so the LUA will turn off the scene
    rule("sum(PriemerTempVonku:temp)/size(PriemerTempVonku) > 10 = > ****************************************")
     

    Why do you sum when PriemerTempVonku is not a table with ids ?

    I believe that sum and size will not work if it's not a table.

    To start scene 159 you can do 159:start

    rule("PriemerTempVonku:temp > 10 => LUAscena:start")

     

     

    Link to comment
    Share on other sites

     

     

     

    HC3 + EventRunner 4
     HT  = {  
    _Kancel_pohyb  =  1 48 ,
    PriemerTempVonku  = { 380 , 37 , 28 }, 
    _Kancel_hlavica_ = 54,
    _WC_dielna_Hlavice_ = 55,
     }
     
     
    pravidlo ( "_Kancel_pohyb:porušené & 
    súčet(PriemerTempVonku:temp)/veľkosť(PriemerTempVonku) <= 10 &
    **************************** => _Kancel_hlavica_: heatingThermostatSetpoint = 21 _WC_dielna_Hlavice_: heatingThermostatSetpoint = 21 " )
     
    pravidlo ( "trueFor(00:05,_Kancel_pohyb:safe) => _Kancel_hlavica_:Nastavená hodnota termostatu vykurovania = 18 ; _WC_dielna_Hlavice_:Nastavená hodnota termostatu = 18" )
     
    Dobrý deň, mám dve pravidlá.
    K prvému pravidlu potrebujem pridať ****** miesto: _Kancel_head_ = nastavená na 18 stupňov Celzia.
     
    Vopred dakujem za rady.
    Edited by budu
    Link to comment
    Share on other sites

    Hi. Here's how to create a rule:

    rule("@@00:05:00 & (PriemerTempVonku:temp < 10) => LUAscena:start")

     

    Thak you

    Edited by budu
    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
    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...