Jump to content
  • Announcements

    • T.Konopka

      DOWNLOADS - new way of sharing solutions!   01/17/18

      Dear users, We want you to have a great time here on the Forum, therefore, we are introducing a new tool for sharing solutions! DOWNLOADS - a system of file sharing for all of you. DOWNLOADS - support topics - this is a new category for support topics. Check the short guide for Downloads on how to add a solution (all files have to be approved).   Crowd's Solutions will be closed for new submissions, but still open for replies in remaining topics. We ask the authors of the solutions to add their solutions to Downloads with the link to the topic at the top of the description. We will merge the support topic with the one from Crowd's Solutions.   If you have any questions, feel free to ask our administrators - @T.Konopka and @I.Srodka!
    • T.Konopka

      DOWNLOADS - nowy sposób dzielenia się rozwiązaniami!   01/17/18

      Szanowni użytkownicy, Chcemy, abyście świetnie spędzali czas na Forum, dlatego przedstawiamy wam nowe narzędzie do dzielenia się rozwiązaniami! DOWNLOADS - system dodawania i pobierania plików. DOWNLOADS - support topics - to jest nowa kategoria z tematami wsparcia. Sprawdźcie przewodnik dla Downloads, aby wiedzieć jak dodać rozwiązanie (wszystkie pliki muszą zostać zatwierdzone).   Rozwiązania Społeczności zostaną zamknięte dla nowych tematów, jednak tematy już wczęśniej dodane będą nadal dostępne. Prosimy autorów rozwiązań do przenoszenia ich do Downloads - prosimy o dodanie linkiem do tematu na górze opisu. Połączymy wtedy temat wsparcia z tematem z Rozwiązań Społeczności.   W przypadku pytań, prosimy o kontaktowanie się z administratorami - @T.Konopka and @I.Srodka. (Rozwiązania mogą być dodawane w języku polskim!)
    • T.Konopka

      Technical Support Helpline - May Holidays   04/23/18

      Dear users, We would like to inform you that due to incoming holidays in Poland on 30th of April and on 1st and 3rd of May our Technical Support helpline will not be available. We apologize for the inconvenience. Sincerely, FIBARO Team
    • T.Konopka

      Linia Wsparcia Technicznego - Majówka   04/23/18

      Drodzy użytkownicy, W związku z nadchodzącą majówką, 30 kwietnia oraz 1 i 3 maja linia Wsparcia Technicznego nie będzie dostępna. Za utrudnienia serdecznie przepraszamy. Z wyrazami szacunku, Zespół FIBARO

Question

is there a way to make home or away Variables by using your wifi at home so the Fibaro system nows when I ip dress comes into the area it know someone is home

Share this post


Link to post
Share on other sites

23 answers to this question

Recommended Posts

  • 0

you can simply use API call:

http://192.168.1.36:80/api/networkDiscovery/arp

for getting all devices in network. But it sometimes ugly and works not properly.

also, you can simply search some scripts in this forum. 

 

-----------------------------------------------------------------------------------------------------------------------

otherwise if you developer you can use my work :)

 

so, I wrote a script and call it every 5 mins 

notice: I created in HC global vars for each family member. 

Please login or register to see this code.

 

in HC LUA script I check if all members are 0 and send to device push popup notification with asking to arm house.

also, I have VD.

 

FNEWxWfzRC.png

 

  

 

 

Share this post


Link to post
Share on other sites
  • 0
  • Inquirer
  • can't see you vd to showing up 

    can I copy you Lua code but just change the ip address and Mac address and will it work

     

    Share this post


    Link to post
    Share on other sites
    • 0
    Posted (edited)

    yep

    Please login or register to see this image.

    /monthly_2018_04/image.png.a6c2b5c488308437ed4ff22bcade7ba4.png" />

    Please login or register to see this attachment.

    11 minutes ago, davidneale said:

    can I copy you Lua code

     

    btw. it's python. not LUA.

    python code works on my raspberry pi server.

    Edited by 10der

    Share this post


    Link to post
    Share on other sites
    • 0

    omg. did you see my note here?

    ==============================================

    otherwise if you developer you can use my work :)

    ==============================================

     

    sorry. I can't.

    Share this post


    Link to post
    Share on other sites
    • 0

    Hi,

     

    I use two solutions based on what fits best for the user/phone i want to track.

     

    Presence detection via Wifi:

    Please login or register to see this link.

     

    and

     

    Presence detection via IFTT:

    Please login or register to see this link.

     

    To translate the pages I use Google Chrome browser.

     

    Enjoy.

    Remi

     

    Share this post


    Link to post
    Share on other sites
    • 0
    1 hour ago, Remi said:

    Please login or register to see this link.

    as I can see 

    1) phones should have static IP

    2) idk, what is a port pinging. this port closes for my IPhone. AFAIR 3500 it's RTMP Port. but again idk what mean the author of this post

    Please login or register to see this code.

    ... 

    your second link also useless for me. :)

    1 hour ago, Remi said:

     

    Please login or register to see this link.

     

     

    native FIBARO integration works with periodically requests (polling) user GPS location. It's not a good solution as for me for this task:

    1) not accurate at all

    2) require "GPS always on" 

    3) as a result -  FIBARO app ("eat") drain battery

    4) and last - main issue (as for me) - real IP address and your ISP must not use NAT firewalling for your router.

    Share this post


    Link to post
    Share on other sites
    • 0
    Posted (edited)

    Iam sorry if none of the solutions fit you well. I am sure there will be a lot more solution to achief the same.

     

    For the first solution.

    None of my phones has a static ip and its working like a charm. (Maybe i am just lucky to get the same IP every time :) )

    Your correct about the iPhone (I don't have a IPhone) but If I remember correct they had a solution/workaround for that.

    You have to read further in that topic I gues. (sorry)

    For me, as I am using android its working very good.

     

    As for the second link, you didn't read the whole article.

    They use the Fibaro solution as intro, in the second part of the page they explain the better solution I am using.

     

    Isnt a free DDNS registration a solution you can use for changing outside IP?

     

    I am using the first solution for my kids.

    Its often they have burned their MB's of their mobile subscription and without internet access solution 2 doesn't work :-)

    Also having a low battery has impact since it put (most) phones in a power save mode.

    So i use the first solution for my kids. When they get in range of the wifi they are registered "Home" and vice versa.

     

    For me and my wife i use the second solution.

    I like that better since the trigger to register me home is much sooner while the first solution has a delay of ~1 minute.

    In rare occasion's the second solution mis the trigger, but overall both solution work very well for me.

     

    Edited by Remi

    Share this post


    Link to post
    Share on other sites
    • 0

    The topic has been moved from "

    Please login or register to see this link.

    " to "

    Please login or register to see this link.

    ".

     

    Temat został przeniesiony z "

    Please login or register to see this link.

    " do "

    Please login or register to see this link.

    ".

    Share this post


    Link to post
    Share on other sites
    • 0
    Posted (edited)
    3 hours ago, Remi said:

    Isnt a free DDNS registration a solution you can use for changing outside IP?

    ISP NAT firewalling mean what all (sic!) ports in your router are closed via your ISP

    trick with DDNS doesn’t work, Sir

    just FYI

    Edited by 10der

    Share this post


    Link to post
    Share on other sites
    • 0

    Sorry, didn't know that! Thanks for explaining sir :)

    Share this post


    Link to post
    Share on other sites
    • 0
    19 hours ago, 10der said:

    as I can see 

    1) phones should have static IP

    2) idk, what is a port pinging. this port closes for my IPhone. AFAIR 3500 it's RTMP Port. but again idk what mean the author of this post

    Please login or register to see this code.

     

     

    @10der As this Vfib has been created by some smart guy on the French Fibaro forum and my LUA knowledge is limited (I can make simple scripts :) )

    How I think it works. You doesn't need a fixed IP for a phone. It doesn't need to know your IP at all.

    It does a scan (Ping) over the network and look in his own ARP cache if it find the MAC address of your phone.

     

    Maybe you have seen version 1.0 on the first page? (I think version 1.0 used a fixed IP indeed)

    Latest version is 2.1

     

    Vfib 2.1:

    Please login or register to see this attachment.

     

    Create global variable, for example your name with value's "Home" and "Away".

    Fill in MAC address in IP field of VD (Must be lowercase)

    You have to customize some things in the VD to your own.

    Like the icon's ID's and change the global variable name and value's to the one's you created.

     

    But your a lot smarter than me with LUA so maybe needless to explain this all :)

     

     

    Share this post


    Link to post
    Share on other sites
    • 0

    thank for the answer. will do.

    but looking via ARP cache - it's bad. really bad. IMHO plus own experience

    Share this post


    Link to post
    Share on other sites
    • 0
    Posted (edited)

    btw

     

    local HC2 = Net.FHttp("127.0.0.1", 11111);

     

    you can simple replace 

    Please login or register to see this code.

     

    :)

    Edited by 10der

    Share this post


    Link to post
    Share on other sites
    • 0
    47 minutes ago, 10der said:

    thank for the answer. will do.

    but looking via ARP cache - it's bad. really bad. IMHO plus own experience

     

    @10der I trust you about that, but iam wondering whats the bad thing about that?

    Is it the "overhead" of scanning the whole subnet while searching for only one device?

     

    It seems to work very well for months now.

     

    20 minutes ago, 10der said:

    btw

     

    local HC2 = Net.FHttp("127.0.0.1", 11111);

     

    you can simple replace 

    api(/networkDiscovery/arp)

     

    :)

     

    Is this the same but different notation, or better?

     

    Thanks,

    Remi

    Share this post


    Link to post
    Share on other sites
    • 0

    also.  

    Please login or register to see this code.

    is too long operation and costly operation for HC2 - if you have 4 family users you should call this operation 4 times.

     

    Please login or register to see this code.

     

    Please login or register to see this image.

     

    or

     

    Please login or register to see this code.

     

    BLUsrhIyHt.png

    Share this post


    Link to post
    Share on other sites
    • 0
    Posted (edited)

     so. look like a complete solution for you:

     

    Please login or register to see this code.

     

    1) create globals params

    Please login or register to see this image.

     

    2) define the name in the script without suffix "Presence"

    3) create global param AutoPresence 

     

    profit!

    aAie5QIxtf.png

    Edited by 10der
    • Like 1

    Share this post


    Link to post
    Share on other sites
    • 0
    Posted (edited)

    @10der ROFL Sir! I am truly speechless! Awesome!

    You made this this morning? Amazing.

     

    I like the idea to have one script instead of 4 or 5 (in my case)

    And I love the VD layout with status and counter for family members.

     

    Would you be so kind to share the Vfib with me/us ? :)

     

     

    Edited by Remi

    Share this post


    Link to post
    Share on other sites
    • 0

    Please login or register to see this attachment.

    Share this post


    Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

    ×