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

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
Posted

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 …)

  • Topic Author
  • Posted

    @tinman strange.

    1st call should be 401

    than login OK

    and silence.

    Guest Freddan67
    Posted

    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)

  • Topic Author
  • Posted

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

     

     

    Guest Freddan67
    Posted
    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 :)

  • Topic Author
  • Posted

    Please login or register to see this code.

    Please login or register to see this image.

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

    Guest Freddan67
    Posted
    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.

  • Topic Author
  • Posted

    V5. some improvements

    • 2 months later...
    Posted
    On 5/18/2020 at 9:43 PM, tinman said:

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

    Please login or register to see this link.

     

     

     

     

     

    I got the same issue, keeps saying Login OK and Wrong status in the debug screen. Restarted the Unifi Controller and Homecenter 3, but doesn't help.

  • Topic Author
  • Posted

    @chiel-s just a moment

    this work propepry. idk

    Please login or register to see this attachment.

    Posted
    5 minutes ago, 10der said:

    @chiel-s just a moment

    this work propepry. idk

    Please login or register to see this attachment.

     

    Thanks for the quick reply. Unfortunately the same problem with this version. 

  • Topic Author
  • Posted (edited)

    btw 401 always will be here... when token is expire or missing.

    OK - said what token now OK and all went OK

    Edited by 10der
    • 8 months later...
    Posted (edited)

    At variables, What is the "site" ?
    How I can setup the variable to suit my home environment?
    I am the beginner. Please teach me. 

    Edited by Jaejin Lee
    Posted
    5 hours ago, Jaejin Lee said:

    At variables, What is the "site" ?
    How I can setup the variable to suit my home environment?
    I am the beginner. Please teach me. 

    Please login or register to see this image.

    /monthly_2021_04/image.png.7dfaca39abe45dabcc40716d62243299.png" />

    Posted
    20 minutes ago, hater said:

    Please login or register to see this link.

    Thank you so much.

    Have a nice weekend!

    • 2 months later...
    Posted

    Is there a way to make this work with a UDMP?

     

    Or maybe another method?

    • 3 weeks later...
    Posted

    is this working with the udmp ? becus  i cant get it to work ? 

     

    • 3 weeks later...
    Posted

    Hi guys. 

     

    Can anyone help?

     

    I have added the quick app in and now keep getting the following: - 

     

    Can anyone help out?

     

    [20.08.2021] [17:53:00] [DEBUG] [QUICKAPP150]: loginUnifi() succeed

    [20.08.2021] [17:53:10] [TRACE] [QUICKAPP150]: checkMacUnifi() succeed

    [20.08.2021] [17:53:10] [ERROR] [QUICKAPP150]: QuickApp crashed

    [20.08.2021] [17:53:10] [ERROR] [QUICKAPP150]: /usr/share/lua/5.3/json/decode/util.lua:35: unexpected character @ character: 2 1:2 [<] line:

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