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


  • 0

Stand Alone Presence Phone Checker


froogle

Question

I am wondering how this is setup 

Please login or register to see this link.

 

I've tried using google translate to read the site but it's difficult because for some reason it won't let me login.

 

I downloaded the virtual device, but I can't see how to use it.

 

Can someone please provide step by step instructions on installation?

 

thanks in advance.

Link to comment
Share on other sites

Recommended Posts

  • 0

A Synology has a function to start up, and shutdown, automatically. Maybe you can start your Synology every weekday at 6.50 PM?

 

Another way is to use the Synology Webserver or a TCP communication port. Get the status by using the HC2 function Net.FTcpSocket (TCP) or Net.FHttp (HTTP)

It will return an error code to use to validate if the Synology is online or not. This is less CPU consuming.

I have the start-up and shutdown function already in use for years, long before you could schedule per day.

Thanks for the tip to use Net.FTcpSocket   for device that have a static IP address to see if they are on-line or not.

Can this be used with a MAC address?

Link to comment
Share on other sites

  • 0

Why do you need the Mac-address? Does you're Synology IP-address get changed somehow?

Link to comment
Share on other sites

  • 0

Why do you need the Mac-address? Does you're Synology IP-address get changed somehow?

It's not only for the Synology. I started to use the presence phone checker for all device in my network to check there on-line status. 

Most have static IP addresses, but laptops and tablet have dynamic IP addresses

At 15 VD's the HC2 became very slow and the CPU usage was very high. see post 29

Link to comment
Share on other sites

  • 0

Why do they have dynamic IP-addresses? Is your DHCP server able to reserve ip-addresses?

 

When your local network has devices 'locked' with dedicated IP-addresses, it's easier to accomplish what you're trying to do.

Link to comment
Share on other sites

  • 0

Why do they have dynamic IP-addresses? Is your DHCP server able to reserve ip-addresses?

 

When your local network has devices 'locked' with dedicated IP-addresses, it's easier to accomplish what you're trying to do.

In the past I didn't care about the IP addresses the mobile devices.

I can pre assign IP adresses. Better start doing that 

Please login or register to see this image.

/emoticons/default_icon_biggrin.gif" alt=":-D" />

 

Please login or register to see this attachment.

Link to comment
Share on other sites

  • 0

Just an example how configured my local network. I assigned different MAC-addresses to a range, say for example:

 

192.168.0.0 - 10 = Network servers, routers, accesspoints, NAS, printers

192.168.0.11 - 20 = Desktop computers

192.168.0.21 - 30 = Laptop computers

192.168.0.31 - 40 = IP-Cameras

etc.

 

All new devices getting ip's from the DHCP in a higher range, for example, 192.168.0.100 - 150.

Now you can check devices by type if they're online.

Mobile devices by arp.

Routers, nasses, printers do have a webmanager, so you can check for http.

etc.

 

This will definitely limit the use of CPU consuming networktraffic. The HC2 doesn't have the power to do all that. I only check devices which are crucial to the HC2, with the HC2. For other network surveillance tasks I use a Zabbix (or in the past Cacti) server, which is capable of using different protocols, like SNMP and ICMP (Ping).

 

Maybe you can make a new topic, then I will try to help you out, if you have questions?

 

EDIT: Post the link to the new topic here, so i can find it.

Please login or register to see this image.

/emoticons/default_icon_wink.gif" alt=";-)" />

Edited by Lambik
Link to comment
Share on other sites

  • 0

Just an example how configured my local network. I assigned different MAC-addresses to a range, say for example:

 

192.168.0.0 - 10 = Network servers, routers, accesspoints, NAS, printers

192.168.0.11 - 20 = Desktop computers

192.168.0.21 - 30 = Laptop computers

192.168.0.31 - 40 = IP-Cameras

etc.

 

All new devices getting ip's from the DHCP in a higher range, for example, 192.168.0.100 - 150.

Now you can check devices by type if they're online.

Mobile devices by arp.

Routers, nasses, printers do have a webmanager, so you can check for http.

etc.

 

This will definitely limit the use of CPU consuming networktraffic. The HC2 doesn't have the power to do all that. I only check devices which are crucial to the HC2, with the HC2. For other network surveillance tasks I use a Zabbix (or in the past Cacti) server, which is capable of using different protocols, like SNMP and ICMP (Ping).

 

Maybe you can make a new topic, then I will try to help you out, if you have questions?

 

EDIT: Post the link to the new topic here, so i can find it.

Please login or register to see this image.

/emoticons/default_icon_wink.gif" alt=";-)" />

I have a simular setup, only new devices and mobile device came in the 0-20.

As soon as I run into issues or need your help again, I will make a new topic and post the link here.

Try first, then ask 

Please login or register to see this image.

/emoticons/default_icon_rolleyes.gif" alt=":roll:" />

Link to comment
Share on other sites

  • 0

Okay, that's the spirit!

Please login or register to see this image.

/emoticons/default_icon_mrgreen.gif" alt=":mrgreen:" />

Link to comment
Share on other sites

  • 0

Is this working still on 4.082? My VD seems to have it wrong, it shows both, me and my girlfriend always home. 

Link to comment
Share on other sites

  • 0

Is this working still on 4.082? My VD seems to have it wrong, it shows both, me and my girlfriend always home. 

I don't use 4.082 because of the VD problems reported by users.

Please login or register to see this image.

/emoticons/default_icon_curve.gif" alt=":-/" />

Link to comment
Share on other sites

  • 0

I don't use 4.082 because of the VD problems reported by users.

Please login or register to see this image.

/emoticons/default_icon_curve.gif" alt=":-/" />

 

According to some users it works perfectly and it is all in ours heads Lambik... you may have success but I am one that has had issues! Seems to be a lot of French users that have a miracle cure for this biased bug! 

Please login or register to see this image.

/emoticons/default_icon_razz.gif" alt=":-P" />

Link to comment
Share on other sites

  • 0

Hope thats alright, but I made video with step by step integration. It may help someone:
 

Edited by HomeSystem.sk
  • Like 1
Link to comment
Share on other sites

  • 0

@HomeSystem.sk,

 

Can you please share the kodi .png's that flashed by in your video?

Link to comment
Share on other sites

  • 0

@HomeSystem.sk,

 

Can you please share the kodi .png's that flashed by in your video?

I am planing on doing complete how to video soon, please subscribe on youtube to get it. I will do step by step for that.

Link to comment
Share on other sites

  • 0

I just need the icons, cant find them anywhere

Please login or register to see this image.

/emoticons/default_smile.png" alt=":)" srcset="https://forum.fibaro.com/uploads/emoticons/[email protected] 2x" width="20" height="20" />

 

But will subscribe, always good to have a good source of info!

Edited by jimicr
Link to comment
Share on other sites

  • 0

I have one issue I am trying to solve with this VD.

With android phone everything works great, but with iPhone, the VD sometimes gives me offline message while the phone is in the range. It is probably because of something that iPhone does when it goes to sleep or something. So I have this issue : I am trying to lock alarm as soon as none of the phones are within the range. If I do simple scene  - If variable changes, then set arm... then the alarm get locked while the iphone is in range, but only got disconnected for a second. 

Do you guys have any solution how to use this VD for locking the alarm? Or how to avaid the problem with iPhone disconnecting for the short period of time? Thanks

Link to comment
Share on other sites

  • 0
13 hours ago, HomeSystem.sk said:

I have one issue I am trying to solve with this VD.

With android phone everything works great, but with iPhone, the VD sometimes gives me offline message while the phone is in the range. It is probably because of something that iPhone does when it goes to sleep or something. So I have this issue : I am trying to lock alarm as soon as none of the phones are within the range. If I do simple scene  - If variable changes, then set arm... then the alarm get locked while the iphone is in range, but only got disconnected for a second. 

Do you guys have any solution how to use this VD for locking the alarm? Or how to avaid the problem with iPhone disconnecting for the short period of time? Thanks

 

To track presence of iPhones on my wireless network I use the following VD button code to check my DD-WRT router which works 100% of the time (Even when iPhone is asleep).

 

Please login or register to see this attachment.

 

You need one predefined variable per person you want to track, in the below example you see wifiRob which has a value of "0" or "1"


-- DD-WRT user and password for login
user = "ROUTERUSER";
pwd = "ROUTERPASWORD";
-- MAC address to search for
deviceMAC = "2C:33:61:48:CF:AC";
-- Predefined variable name
globalVar = "wifiRob";
-- value 1 and value 2 of predefined variable
txtOnline = "1";
txtOffline = "0";
-- END USER SETTINGS --
-- DO NOT CHANGE FROM HERE --
selfId = fibaro:getSelfId();  
ip = fibaro:get(selfId, 'IPAddress'); 
port = fibaro:get(selfId, 'TCPPort'); 
router = Net.FHttp(ip, port);
router:setBasicAuthentication(user,pwd); 
response, status, errorCode = router:GET("/Status_Wireless.asp");
 fibaro:debug(response)
if(string.find(response, deviceMAC)) then
  fibaro:setGlobal(globalVar, txtOnline);
else 
  fibaro:setGlobal(globalVar, txtOffline);
  fibaro:debug("Set Variable")
   fibaro:debug("Rob is out");
end

 

Once the VD is working you need to create 1 button for each persons iPhone. 

 

I then created a looping scene to press the VD buttons every 15 seconds one at a time (you may need to adjust this if you have a lot of phones to monitor as I only have two).

 

 

--[[
%% autostart
%% properties
%% weather
%% events
%% globals
--]]

local sourceTrigger = fibaro:getSourceTrigger();
function tempFunc()
local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
 ( (math.floor(os.time()/60)-math.floor(1490016600/60))%1 == 0 )
)
then
     setTimeout(function()
        fibaro:call(114, "pressButton", "4");
        fibaro:debug("Bridget Wifi Pressed")
    end,15000)
--end
    setTimeout(function()
        fibaro:call(114, "pressButton", "3");
        fibaro:debug("Rob Wifi Pressed")
    end,30000)   
end
    setTimeout(function()
        fibaro:call(114, "pressButton", "4");
        fibaro:debug("Bridget Wifi Pressed")
    end,45000)
--end
    setTimeout(function()
        fibaro:call(114, "pressButton", "3");
        fibaro:debug("Rob Wifi Pressed")
    end,60000)
setTimeout(tempFunc, 60*1000)
end
if (sourceTrigger["type"] == "autostart") then
tempFunc()
else

local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
startSource["type"] == "other"
)
then
    setTimeout(function()
        fibaro:call(114, "pressButton", "4");
        fibaro:debug("Bridget Wifi Pressed")
    end,17000)
end
    setTimeout(function()
        fibaro:call(114, "pressButton", "3");
        fibaro:debug("Rob Wifi Pressed")
    end,1000)   
    setTimeout(function()
        fibaro:call(114, "pressButton", "4");
        fibaro:debug("Bridget Wifi Pressed")
    end,47000)
    setTimeout(function()
        fibaro:call(114, "pressButton", "3");
        fibaro:debug("Rob Wifi Pressed")
    end,31000)   
end

 

 

 

Lastly I created an occupancy count variable that increments up or down each time a wifiRob or wifiWife join or leave the network and used the below block scenes to increment the variable when I join the network and decrement.

 

Please login or register to see this attachment.

Please login or register to see this attachment.

 

This means at any given time my system knows if myself or my wife or both of us are home.

 

The system is reliable enough that I operate my door locks with it.

 

I hope this helps out. :)

 

(FYI Credit to original code does not belong to me, it is something I found on the French forum)

 

 

Edited by Robert Folbigg
Link to comment
Share on other sites

  • 0
31 minutes ago, Robert Folbigg said:

 

To track presence of iPhones on my wireless network I use the following VD button code to check my DD-WRT router which works 100% of the time (Even when iPhone is asleep).

 

Please login or register to see this attachment.

 

You need one predefined variable per person you want to track, in the below example you see wifiRob which has a value of "0" or "1"


-- DD-WRT user and password for login
user = "ROUTERUSER";
pwd = "ROUTERPASWORD";
-- MAC address to search for
deviceMAC = "2C:33:61:48:CF:AC";
-- Predefined variable name
globalVar = "wifiRob";
-- value 1 and value 2 of predefined variable
txtOnline = "1";
txtOffline = "0";
-- END USER SETTINGS --
-- DO NOT CHANGE FROM HERE --
selfId = fibaro:getSelfId();  
ip = fibaro:get(selfId, 'IPAddress'); 
port = fibaro:get(selfId, 'TCPPort'); 
router = Net.FHttp(ip, port);
router:setBasicAuthentication(user,pwd); 
response, status, errorCode = router:GET("/Status_Wireless.asp");
 fibaro:debug(response)
if(string.find(response, deviceMAC)) then
  fibaro:setGlobal(globalVar, txtOnline);
else 
  fibaro:setGlobal(globalVar, txtOffline);
  fibaro:debug("Set Variable")
   fibaro:debug("Rob is out");
end

 

Once the VD is working you need to create 1 button for each persons iPhone. 

 

I then created a looping scene to press the VD buttons every 15 seconds one at a time (you may need to adjust this if you have a lot of phones to monitor as I only have two).

 

 

--[[
%% autostart
%% properties
%% weather
%% events
%% globals
--]]

local sourceTrigger = fibaro:getSourceTrigger();
function tempFunc()
local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
 ( (math.floor(os.time()/60)-math.floor(1490016600/60))%1 == 0 )
)
then
     setTimeout(function()
        fibaro:call(114, "pressButton", "4");
        fibaro:debug("Bridget Wifi Pressed")
    end,15000)
--end
    setTimeout(function()
        fibaro:call(114, "pressButton", "3");
        fibaro:debug("Rob Wifi Pressed")
    end,30000)   
end
    setTimeout(function()
        fibaro:call(114, "pressButton", "4");
        fibaro:debug("Bridget Wifi Pressed")
    end,45000)
--end
    setTimeout(function()
        fibaro:call(114, "pressButton", "3");
        fibaro:debug("Rob Wifi Pressed")
    end,60000)
setTimeout(tempFunc, 60*1000)
end
if (sourceTrigger["type"] == "autostart") then
tempFunc()
else

local currentDate = os.date("*t");
local startSource = fibaro:getSourceTrigger();
if (
startSource["type"] == "other"
)
then
    setTimeout(function()
        fibaro:call(114, "pressButton", "4");
        fibaro:debug("Bridget Wifi Pressed")
    end,17000)
end
    setTimeout(function()
        fibaro:call(114, "pressButton", "3");
        fibaro:debug("Rob Wifi Pressed")
    end,1000)   
    setTimeout(function()
        fibaro:call(114, "pressButton", "4");
        fibaro:debug("Bridget Wifi Pressed")
    end,47000)
    setTimeout(function()
        fibaro:call(114, "pressButton", "3");
        fibaro:debug("Rob Wifi Pressed")
    end,31000)   
end

 

 

 

Lastly I created an occupancy count variable that increments up or down each time a wifiRob or wifiWife join or leave the network and used the below block scenes to increment the variable when I join the network and decrement.

 

Please login or register to see this attachment.

Please login or register to see this attachment.

 

This means at any given time my system knows if myself or my wife or both of us are home.

 

The system is reliable enough that I operate my door locks with it.

 

I hope this helps out. :)

 

(FYI Credit to original code does not belong to me, it is something I found on the French forum)

 

 

thats exactly what ive been looking for!  I was going over the LUA code and wanted to make sure for  where i highlighted in your post, would you just add a second MAC address with a comma or repeat this line that quoted below with the other MAC address' for additional phones?

 

35 minutes ago, Robert Folbigg said:

-- MAC address to search for
deviceMAC = "2C:33:61:48:CF:AC";

 

ive tried the location feature in the Fibaro app, but it drains the battery ridiculously too fast in my Nexus 6P and my wife's Nexus 5x phones to even be used for location purposes... 

Link to comment
Share on other sites

  • 0
2 minutes ago, matt1981 said:

thats exactly what ive been looking for!  I was going over the LUA code and wanted to make sure for  where i highlighted in your post, would you just add a second MAC address with a comma or repeat this line that quoted below with the other MAC address' for additional phones?

 

38 minutes ago, Robert Folbigg said:

-- MAC address to search for
deviceMAC = "2C:33:61:48:CF:AC";

 

 

The VD Code needs to be duplicated into a second button for another Mac address, as you can see the screen shot of my VD it has two buttons. WIFI Rob and WIFI Bridget, one has the MAC of my iPhone the second has the MAC of my wife iPhone.

43 minutes ago, Robert Folbigg said:

Please login or register to see this image.

/monthly_2017_05/592bf7ae1f4fb_ScreenShot2017-05-29at8_17_27pm.thumb.png.bcce924a58e83adce6cb8d45385d5f1f.png" />

 

I should also note I am using iPhone 7 Plus and my wife uses 6s Plus both running latest IOS, I can't confirm it will work on earlier versions of the iPhone.

 

Link to comment
Share on other sites

  • 0

Hi, i am just trying to get this to work. Can someone please tell me what Data i have to change in the virtual Device?

I Changed at the Top the IP Adress into my Mac Adress in this format: 40:98:AD:46:31:88

I created a Global Var for my Phone and changed the name in the virtual device.

What else do i have to Change?

Thanks

 

Link to comment
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...