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


10der

HC3: UNIFI presence

Recommended Posts

Posted (edited)

Please login or register to see this image.

/monthly_2020_05/image.png.a16cba642eb6dca1e2a4f84f99d758c2.png" />

 

image.png.976a63ce14bb5e3042b881c877a1d3db.png

 

 

so,. now you can trigger event if nobody at home.

 

V2

 

{
    type = "custom-event",
    property = "unifi_presence",
    operator = "==",
    isTrigger = true
}
 
print(json.encode(sourceTrigger))
print(fibaro.getValue(1842"userDescription"))
 

 

V3

 

username / password

 

V4

 

V5 - improvements

 

 

 

Please login or register to see this attachment.

Edited by 10der
  • Like 2

Share this post


Link to post
Share on other sites

almost, getting after each init 401 (probably set Cookie)

Please login or register to see this image.

/monthly_2020_05/image.png.c8c4475e663b2e2a1cbd42e4a3e7b5cc.png" />

 

but it works second later

image.png.47db766da31e75d74819a526bca3732b.png

 

On HC2 i was using modified solution from Lazar, measured Signal strenght and availibility of smart watch, iPhone and Laptop (to reduce/avoid issues with empty battery on one device = Alarm set and siren activated just after i moved a bit in my bed …)

Share this post


Link to post
Share on other sites
  • Topic Author
  • @tinman strange.

    1st call should be 401

    than login OK

    and silence.

    Share this post


    Link to post
    Share on other sites

    Seems to work fine but how can I do if I want to run a scene if person 1 comes home and person 2 is gone ?. (I'm still pretty new at LUA so I ask to learn)

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • @Freddan67 fixed

     

    [19.05.2020] [10:01:11] [DEBUG] [SCENE30]: {"Oleg":{"state":true,"oldState":false}}

     

    DECLARATIONS (Conditions/Triggers)

    {
        type = "custom-event",
        property = "unifi_presence",
        operator = "==",
        isTrigger = true
    }
     
    ACTIONS
    print(json.encode(sourceTrigger))
    print(fibaro.getValue(1842"userDescription"))
     
     
    QA updated.
     

     

     

    Share this post


    Link to post
    Share on other sites
    25 minutes ago, 10der said:

    @Freddan67 fixed

     

    [19.05.2020] [10:01:11] [DEBUG] [SCENE30]: {"Oleg":{"state":true,"oldState":false}}

     

    DECLARATIONS (Conditions/Triggers)

    {
        type = "custom-event",
        property = "unifi_presence",
        operator = "==",
        isTrigger = true
    }
     
    ACTIONS
    print(json.encode(sourceTrigger))
    print(fibaro.getValue(1842"userDescription"))
     
     
    QA updated.
     

     

     

    Thanks. I'll try when I get home if I understand :)

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • Please login or register to see this code.

    Please login or register to see this image.

    /monthly_2020_05/image.png.0004fc0484eaea2690abb88f5226c7fd.png" />

    • Like 1

    Share this post


    Link to post
    Share on other sites
    12 minutes ago, 10der said:

    Please login or register to see this code.

    Please login or register to see this link.

    Thanks @10der. I want to start sonos in the kitchen when I come home and my wife is not home so now it will be fun to try to get it together.

    Share this post


    Link to post
    Share on other sites
  • Topic Author
  • V5. some improvements

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