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


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

Recommended Posts

  • 0
Posted (edited)

Thanks @10der for this 

 

I hope you don't mind but I made 2 minor changes to your Unifi_Checker.lua to enable this code to check for the Unifi Devices (USG, AP) instead of the Clients

The LAN Checker VD didn't work to check if the AP is offline as there are no open ports

 

Within the function getDevices(cookie)

 

Change

Please login or register to see this code.

to 

Please login or register to see this code.

 

 

Within the function has_mac(tab, val) 

 

Change 

Please login or register to see this code.

to 

Please login or register to see this code.

 

I also tweaked the text to show as being offline/online as opposed to being present

 

Please login or register to see this image.

/monthly_2020_01/image.png.2db7a4ac1e0c35907504eeca02aba77a.png" />

 

I suppose the changes to check both the Unifi devices and clients could be incorporated into one scene

 

anyway, I hope this helps someone 

 

 

 

Edited by AutoFrank
  • Thanks 1

Share this post


Link to post
Share on other sites
  • 0

@10der thanks for the scenes and VD, this was exactly what I was looking for.

 

I have a Unifi Cloudkey Gen2 Plus on my network, so implemented your Presence state VD and Unifi checker scene. Followed your instructions for setting up the Global variables.

 

I'm seeing some strange behaviour: when I switch off Wifi on my iphone I can see the Unifi checker debug change from "Presence yes: MyName" to "Presence no: MyName", but after a couple of scene loops it changes back to "Presence yes: MyName".

 

Any ideas what might be wrong?

 

Thanks,

 

 

Share this post


Link to post
Share on other sites
  • 0
Quote

Any ideas what might be wrong?

You can turn on debugging 

and we can look what happened 

Share this post


Link to post
Share on other sites
  • 0

 

This is a cut and paste of the debug from the unifi checker scene:

Please login or register to see this image.

/monthly_2020_01/image.png.588deb608ac84dc059ebf66f23790366.png" />

 

Turned of my wifi at 21:52:50 and kept it off, 45 secs later the scene turns presence on again (while in my Unifi dashboard I am not present). The time between re-appearance seems random, sometimes 10-15 sec, sometimes longer, sometime it will not set presence to "no".

 

Thanks,

 

 

 

 

 

 

 

Edited by 6Blok

Share this post


Link to post
Share on other sites
  • 0

I would like to ask for advice:

 

- "Unifi checker" cannot be used because I do not have a HW controller and therefore I do not have a controller IP address but only an address that starts with "localhost ..."

 

- so I wanted to use "wifi-presence", everything is set up according to the instructions, but continuous detection of MAC presence on WIFI. Do I still have to start the scene?

 

Please login or register to see this spoiler.


- last I installed "presence-state", which should evaluate the status of "wifi-presence", but also misrepresenting, because "wifi-presence" seems not to run periodically for initial detection.

 

Where am I making mistake?

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
Answer this question...

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