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

Posted

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

Recommended Posts

  • 0
Posted
On 4/18/2018 at 11:29 AM, 10der said:

Please login or register to see this attachment.

Line 67 gave an error. I have read this thread Like 15 times but can’t get it working. Just bought my hc2 and have alot to learn. Anybody over here who can help me understand this Lua code better?

 

thanx in advance 

  • 0
Posted

@boegia Ok here is latest VD

please play attantion what VD works with pre-defined vars!

please create this vars before.

 

1) SecuritySystem with string values:

AwayArmed / NightArmed / Disarmed

 

2) AutoPresence just as normal  integer var

 

3) family global vars (integer) according Name and VD labels

Name + Present

for example

Please login or register to see this image.

/monthly_2019_10/image.png.c4f28de02978889157d3c899da2d99f7.png" />

 

VD config done

 

if you have 

Please login or register to see this link.

 otherwise skip this!!!

 

UniFi_checker.lua  - presence checker by UniFi WiFi

please change this accordin your settiongs

 

Please login or register to see this code.

done

 

Wifi-presence.LUA  - simple (native) wifi presence checker

just configure macs and Names

 

Please login or register to see this code.

 

done

 

Please login or register to see this attachment.

Please login or register to see this attachment.

Please login or register to see this attachment.

  • 0
Posted

Nobody' Checker

 

Please login or register to see this code.

 

  • 0
Posted
14 hours ago, 10der said:

@boegia Ok here is latest VD

please play attantion what VD works with pre-defined vars!

please create this vars before.

 

1) SecuritySystem with string values:

AwayArmed / NightArmed / Disarmed

 

2) AutoPresence just as normal  integer var

 

3) family global vars (integer) according Name and VD labels

Name + Present

for example

Please login or register to see this link.

 

VD config done

 

if you have 

Please login or register to see this link.

 otherwise skip this!!!

 

UniFi_checker.lua  - presence checker by UniFi WiFi

please change this accordin your settiongs

 

Please login or register to see this code.

done

 

Wifi-presence.LUA  - simple (native) wifi presence checker

just configure macs and Names

 

Please login or register to see this code.

 

done

 

Please login or register to see this attachment.

Please login or register to see this attachment.

Please login or register to see this attachment.

 

Do you need a cloud key for the unifi checker? or just the controller and AP? 

  • 0
Posted

please do no overquote in order to ask one question :

 

18 minutes ago, pnutp0wer said:

Do you need a cloud key for the unifi checker? or just the controller and AP? 

I have a local controller. in local network

  • 0
Posted (edited)

@10der Ok thanks, I will implement this and try it. What do I need to fill in at "local site"? 

The site name at (Settings > site > site name )or Controller name (Settings > Controller > Controller Name)

 

Because I get this: 

 

 

[DEBUG] 13:49:24: Connection refused
[DEBUG] 13:49:29: Connection refused
[DEBUG] 13:49:34: Connection refused
[DEBUG] 13:49:39: Connection refused

 

I'm sure I filled in the right IP and user/pw. Because I can login with those credentials to the controller. 

 

Edited by pnutp0wer
  • 0
Posted

@pnutp0wer

Please login or register to see this code.

it's what after http:// in your browser

  • 0
Posted
On 10/28/2019 at 9:23 PM, 10der said:

local unifiController = "192.168.1.29:38193"; local site = "e29bk95t"; local username = "unifi"; local password = "unifi";


hi @10der i don’t mean the controller, I mean the second line in the above quote. 

  • 0
Posted
9 hours ago, pnutp0wer said:

What do I need to fill in at "local site"? 

got it

 

ok!

Please login or register to see this image.

/monthly_2019_10/image.png.0676e40783ed6d80db749718e2c00170.png" />

  • 0
Posted

Thank you!!

  • 0
Posted

Ok, mine is "default" according to my IP: 

Please login or register to see this link.

 

But when I enter this I still get in the debug "Connection refused". 

  • 0
Posted (edited)

localhost?

lol

for HC2 localhost is gray box with caption "Home center 2" :)

But how did you install UNIFI contrloller on HC2? :)

 

so. my guess your controller on your work PC.

and your work PC has IP address, 

this IP address different from IP address of Hc2

and finally you should 

run 

ipconfig (if you on Windows)

ifconfig / ip address (if you on *Nix or mac)

and catch your IP address

 

so,. put this address as controller address

 

Edited by 10der
  • 0
Posted (edited)

and one notice here.

Hc2 should / must have access for this controler on your PC

what i mean? IP PORT from ypur PC should / must be accessable from local network and HC2 as well

Edited by 10der
  • 0
Posted (edited)

Ok yes, I had to fill in the IP address of the computer which runs my controller.

 

Now I'm running into a different issue. After I added the variables, I implement the LUA script and than the VD. 

When I save the VD, the users are shown with their status. But after a few minutes all users turn into "X". 

 

Even when they're still connected to the WiFi. A disconnect and reconnect doesn't help. I also installed the variables and the script again, but neither is working. 

 

Furthermore, I don't get any line or error in the debug window.. 

 

Edited by pnutp0wer
  • 0
Posted

can u uncomment

in 

function checkPresence(tbl)

print(dump(tbl))

 

 

  • Like 1
  • 0
Posted (edited)

@10der 

 

It's working! I just had to wait a little more. In your latest LUA scene there were some additional lines which need to be uncommented too. 

 

Thank you so much! Maybe you can share it in the Downloads section?!

 

Edited by pnutp0wer
IT WORKS!
  • 0
Posted
1 hour ago, pnutp0wer said:

Downloads section?!

not sure if it is useful :)

  • Like 1
  • 0
Posted

Yes I think it's very useful, especially for some scenes where you might want to split up GEOfencing and presence based on wifi connection. 

 

GEOfencing is not always working on the right time so wifi connection could be an answer or maybe a backup functionality 

  • 0
Posted

 

@10der Thank you for sharing this great VD with scenes. But I have one issue, first my wife is marked as absent and after she is present I'm absent. Every time I start the WiFi presence scene it changes back, I'm present and my wifi is marked as absent.

 

Debug Wifi presense scene:

Please login or register to see this image.

/monthly_2019_11/63951380_Schermafbeelding2019-11-26om00_13_45.png.f79b6b1237f1e31be5e5d2bfc93e6592.png" />

 

Debug VD:

Please login or register to see this attachment.

  • 0
Posted (edited)

@kevin if you asking about mode with internal fibaro API 

Please login or register to see this link.

 - it's question is not for me.

you can run 

Please login or register to see this attachment.

this endpoint manually and try to find you and wife mac here.

if not - :( 

but as I can remeber grabbing local network via ARPinging it's give  not 100% succ result.

 

Edited by 10der

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