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


Recommended Posts

Sorry JAn I was looking for some info about location and ER4 and did not look preciese.

I found in previous posts your fix for ER4 but regretley I dont see in debug any info about location

This is what I have

Please login or register to see this code.

>>>>>>> changed something

Do I miss something to do? Or must I leave home and come back to change values?

Please advice,

//Sjakie

Link to comment
Share on other sites

  • Topic Author
  • 8 hours ago, Sjakie said:

    Sorry JAn I was looking for some info about location and ER4 and did not look preciese.

    I found in previous posts your fix for ER4 but regretley I dont see in debug any info about location

    This is what I have

    Please login or register to see this code.

    >>>>>>> changed something

    Do I miss something to do? Or must I leave home and come back to change values?

    Please advice,

    //Sjakie

    First you need to enable the 'location' trigger type

    Ex.

    Please login or register to see this code.

    Then there is also the problem that it will not start to update until people enter or leave.

    You could initialise it manually to "allAtHome" when you start up by

    Please login or register to see this code.

    where <id1> and <id2> is the userIDs of the people at home.

     

    Link to comment
    Share on other sites

    Jan, thank you very much!!!!

    Its me having some isues again.

    I have in swagger 2 Iphones listed not connected to a user this will disturb  allAway or someAtHome!

    Is there a way to exclude those two IPhones? Or must I ask Fibaro to delete them?

    Please advice,

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 6 minutes ago, Sjakie said:

    Jan, thank you very much!!!!

    Its me having some isues again.

    I have in swagger 2 Iphones listed not connected to a user this will disturb  allAway or someAtHome!

    Is there a way to exclude those two IPhones? Or must I ask Fibaro to delete them?

    Please advice,

    //Sjakie

    I don't think that matters. When numberOfOccupants are at home, allAtHome is true. Only userIDs associated with location events are used.

    Link to comment
    Share on other sites

    Jan, this I did request all users and IOS devices wierd is that User B does not get "enter" but iPhone user B will get enter. So I am confused.

    Remark User C and D will be added phone if they will accept invitation (they are a few days in the middle of nowhere).

     

    Please login or register to see this code.

    If I do for both:

    Please login or register to see this code.

    the Rule.eval([[allAway =>  will not be executed

    Or thus this trick not work? We  need physically to leave and enter?

    //Sjkaie

    Link to comment
    Share on other sites

    Jan,

    I left home with my and my wifes IPhone

    user Id=2 (me) does not give any messages in Debug

    user ID=20 shows leaves and enters

    user wife nothing>>(was working in HC2

     

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 13 hours ago, Sjakie said:

    Jan,

    I left home with my and my wifes IPhone

    user Id=2 (me) does not give any messages in Debug

    user ID=20 shows leaves and enters

    user wife nothing>>(was working in HC2

     

    //Sjakie

    Well, I don't know - the 'location' events come from the system and if no events are generated the ER4 will not see them. I can sometimes get logs for me (id 2) in the system - but sometimes it seems like the phone doesn't report anything. In any case I don't rely on this at the moment. I will try to find time to dust of the iCal QA.

    Link to comment
    Share on other sites

    Jan,

    hehe wife phone is working too she was on "old" app now she is on Yubii.

    How to see in log who is comming home? So I can create some "personal" rules?

    Please login or register to see this code.

    Please advice,

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 2 hours ago, Sjakie said:

    Jan,

    hehe wife phone is working too she was on "old" app now she is on Yubii.

    How to see in log who is comming home? So I can create some "personal" rules?

    Please login or register to see this code.

    Please advice,

    //Sjakie

    rule("user1=33")

    rule("#location{user=user1,property='enters', value=homePos} => log('User %s got home',user1)")

    Link to comment
    Share on other sites

    Thanks Jan,

    I think I do something wrong:

    Please login or register to see this code.

    It doest show any debug, AllAtHome is confirmed

    Please login or register to see this attachment.

    Please advice,

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • There is an error in the rules  I gave - somehow the value and property got switched in the original post.

    Please login or register to see this code.

     

    which means that in the latest post you need to change the rules too.

    .property is the ID of the location.

    .value is 'enter' or 'leave'

    To be sure setup this rule just to see what you get

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

    Ok no problem I thought something like that what ever I did it didt result in something usefull.

    I have a bigger problem to solve first.

    Default admin ID=2 Mine is 20I reversed user/admin result mobile App doest give the two most important icons anymore.

    I will restore back till before Geofench and see what will happens.

    //Sjakie

    Link to comment
    Share on other sites

    Jan this is comminhg in debug

    Please login or register to see this code.

     

    Link to comment
    Share on other sites

  • Topic Author
  • 14 hours ago, Sjakie said:

    Jan this is comminhg in debug

    Please login or register to see this code.

     

    Yes, but this is from your own initialising posts to set upon that all are at home?

    ...and you need to switch the property and value fields as I mentioned in the previous post.

    property should be the location id and value should be "enter".

    Let me know what the log statement says when you enter or leave the home location (physically).

    Link to comment
    Share on other sites

    Jan, nope I adde a log to recognice where this rule is.

    The debug I get from leaving and comming back is see below, 2 users reports back. (I took both phones to test)

     

    Please login or register to see this code.

     

     

    This rule didt post log at all

    Please login or register to see this code.

    I think it will be okay?

    Arming the complex was not possible due to all at home>>> disarm ( I hope)? So I extend that rule with only if we are not present.

    We went to bed 23.30 and I saw yesterday around midnigt the QApulled the IPhones because in debug was listed all at home.

    Till this morning no further debug?

    Please advice,

    //Sjakie

    Link to comment
    Share on other sites

  • Topic Author
  • 1 hour ago, Sjakie said:

    Jan, nope I adde a log to recognice where this rule is.

    The debug I get from leaving and comming back is see below, 2 users reports back. (I took both phones to test)

     

    Please login or register to see this code.

     

     

    This rule didt post log at all

    Please login or register to see this code.

    I think it will be okay?

    Arming the complex was not possible due to all at home>>> disarm ( I hope)? So I extend that rule with only if we are not present.

    We went to bed 23.30 and I saw yesterday around midnigt the QApulled the IPhones because in debug was listed all at home.

    Till this morning no further debug?

    Please advice,

    //Sjakie

    The value is "enter" and not "enters" - computers are a bit picky about stuff like that...

    Link to comment
    Share on other sites

    Sorry Jan,

    Those rules where created when I had also a scene in HC3 to test and if scene converted to LUA its "enters".

    Corrected

    Still nothing in debug.

    Please advice,

    //Sjakie

     

     

    Link to comment
    Share on other sites

  • Topic Author
  • 13 minutes ago, Sjakie said:

    Sorry Jan,

    Those rules where created when I had also a scene in HC3 to test and if scene converted to LUA its "enters".

    Corrected

    Still nothing in debug.

    Please advice,

    //Sjakie

    post or PM your rules.

    Link to comment
    Share on other sites

  • Topic Author
  • 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.

     

    Edited by jgab
    Link to comment
    Share on other sites

    On 7/6/2021 at 5:09 PM, jgab said:

    Thanks, to pointing me to this error - I had uploaded the wrong file. Now the .fqa is linked.

    I would advise you to uncomment the rules

    Please login or register to see this code.

    to get automatic updates of the QA when I release new versions (your rules stay the same, it's just visible as a restart of the QA)

    Thanks @jgab it helps me a lot.

    Now i'm trying to turn on light on motion sensor1, wait 5sec, and then if motion sensor2 is safe, turn off light. Please what is best practice to do "if" like this?

    Thanks

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