SNMP Binding for presence detection

468 views
Skip to first unread message

mikefr...@googlemail.com

unread,
Nov 10, 2014, 6:42:11 AM11/10/14
to ope...@googlegroups.com
Hi Community,

I want to use the SNMP binding for presence detection...

The basic idea is to check the signal strenght of a registered device wich works fine as long the device stays within the signal range of my WiFi-Hotspot.

But if the device is loosing the singal (out of home) the signal strenght stays at it's last known value..

I expected the value to be "undefined" or something like that.

My Device (Mikrotik 433) is reporting:
---
echo: snmp community: public
echo: snmp,debug get 1.3.6.1.4.1.14988.1.1.1.2.1.3.32.100.50.198.188.72.4
echo: snmp,debug error: no such name
---

my Item definition:
---
Number MikePresence "Mike at Home [%.0f]" (PresenceChart) {snmp="<[192.168.1.1:public:.1.3.6.1.4.1.14988.1.1.1.2.1.3.32.100.50.121.90.107.4:60000]"}
---


And this is a Chart of my snmp readings for the last 24 hours




Do you have any suggestions?

Thanks for your help

Mike

Daniel Whittred

unread,
Nov 10, 2014, 9:25:32 PM11/10/14
to ope...@googlegroups.com
Hi Mike,

I'm just thinking off the top of my head here, but could you use some sort of limit check in your rules?

like, if device_rssi > 115 for more than 5 minutes, then "Mike" isnt home.

This is how i run my rules for presence detection -- tho I use the NetworkHealth binding, rather than SNMP. I think there is an example of how to do this on the wiki.

Regards,
Daniel

Michael Frey

unread,
Nov 12, 2014, 6:40:26 AM11/12/14
to ope...@googlegroups.com
Hi Daniel,

i tought about the following like

if  the value of MikePresence doesnt change for 10 or 15 minutes the assume that "Mike" is no longer at home..

There is no way for any kind of limit check, because the value of "MikePresence" stays as-it-is when i am switching off my mobile or if i am leaving the wireless network.

I have checked ne network health solution also but i cant get the ip-addresses of the phones because i am not able to run a dhcp-controlled nameserver on the mikroti..

DHCP based fixed IP-Addresses will be another solution for that ... but i dont like fixed IP's for client devices :-)

Thanks anyway

Mike

 

Christoph Wempe

unread,
Nov 12, 2014, 10:31:48 AM11/12/14
to ope...@googlegroups.com
The software "mrtg" (monitoring for router interfaces) has an option called "unknaszero", which stores "0" is the received value is undefined.

If openhab had this option, your problem would be solved.
Maybe someone can implement this funktion in the snmp-binding.

Like:
in:   snmp="<[192.168.2.111:public:.1.3.6.1.2.1.2.2.1.10.10:10000:unknaszero]"

Daniel Whittred

unread,
Nov 16, 2014, 10:23:40 PM11/16/14
to ope...@googlegroups.com
Hi Mike,

I was referring to this page on the samples wiki:

specifically, the part about adding in delays to prevent oscillations when in patchy coverage.

but, im not sure if it is entirely relevant to your situation...

-dan

Michael Frey

unread,
Nov 19, 2014, 8:16:31 AM11/19/14
to ope...@googlegroups.com
Hi Dan,

this is propably another solution, thanks for the suggestion..

But i have to keep in mind, that the power consumption of our mobile phones will rise if we had to switch BT on all day long, and i have to buy and maintain another piece of hardware...

i am going to try it with the network health binding...

Mike

Marcolino

unread,
Nov 19, 2014, 10:52:50 AM11/19/14
to ope...@googlegroups.com
Hi Michael,
I'm looking another way to check my presence.
I Use DD-Wrt on my router, and I have a couple of way to check if MAC of my phone is connected to AP.
Now I'm usinf a telnet script with Except, then I'll try SNMP.
Check if your router can get back via snmp the MAC connected, than is very simple to check if you're at home.

Marco
Reply all
Reply to author
Forward
0 new messages