Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Hardware
 PowerHome Messageboard : PowerHome Hardware
Subject Topic: UDP Listener Port 514 - Idea Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: February 09 2016 at 14:40 | IP Logged Quote smarty

I don't know if this could work or not, but maybe somebody can chime in before I test this out (it will be a couple of days before I test this).

My WAP's have a "syslog" logging option where the WAP logs can be sent to a "syslog server". Just supply the IP address of the syslog server and set up a syslog software solution....way above my system admin skills for what I am hoping to accomplish.

Rather, I just want PH to monitor and trigger off syslog LAN traffic (which should be UDP on port 514 according to Wikipedia).

My plan would be to tell my WAP that my syslog server IP address is 192.168.0.102 (the same as my PH machine), and have my UDP Listener plug-in set to port 514. I would then set up a trigger that fires off the UDP plugin on incoming UDP port 514 traffic.

I would have to see what sort of information was returned and then parse and act accordingly.

Could this work?

I would use this for seeing when my I-phone comes on and goes off my WiFi in addition to other uses I could dream up.

__________________
Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
Back to Top View smarty's Profile Search for other posts by smarty
 
dhoward
Admin Group
Admin Group
Avatar

Joined: June 29 2001
Location: United States
Online Status: Offline
Posts: 4447
Posted: February 10 2016 at 15:33 | IP Logged Quote dhoward

Steve,

I see nothing wrong with your plan. If the WAP is sending the logs as UDP data on port 514 then the UDP plugin should be able to be configured to listen and trigger on this traffic.

Keep us posted how it goes. Im currently "pinging" on a timed event to check for my Android phone and if this method works, may be something I'd like to look into as well (I'd have to check if my Tomato router supports the sending of logs via UDP).

The only thing that may be an issue is the amount of traffic that may be generated. If the trigger is firing constantly it may be too much for the PH machine.

Dave.
Back to Top View dhoward's Profile Search for other posts by dhoward Visit dhoward's Homepage
 
smarty
Super User
Super User
Avatar

Joined: May 21 2006
Location: United States
Online Status: Offline
Posts: 728
Posted: February 28 2016 at 11:15 | IP Logged Quote smarty

Update - On my development machine, I have been able to set up and test the use of this plugin. My set up is below:

ID: UDP_LISTENER
Type: ActiveX
Launch Data: PH_UDPListener.phudp
Init Data: 514

With a trigger of:
ID: UDP Listen
Action Type: (macro or whatever your want)
Action: macro name
Trigger Type: Generic Plugin
Trigger ID UDP_LISTENER (as above)
Trigger ID Number: Command 1
Trigger Value: Option 1
Boolean: ph_or(if(pos("[TEMP5]","]Received disassociate:STA DC:37:14:40:0D:D1")>0,1,0),if(pos("[TEMP5]","]Association Success:STA DC:37:14:40:0D:D1")>0,1,0))

A few notes about my wireless set up:
I have two WAP's that cover my house and property. Each WAP has been configured to send UDP information to my internal IP address where the UDP Listener plugin resides (PH development machine). The 2 WAPS indeed do generate a fair bit of UDP trigger traffic. Over a 24 hour period, I estimate about 500 UDP messages.

Since I only want the trigger to fire when my I-phone (identified by the MAC address) "associates/enters/" or "de-associates/leaves" my Wi-Fi network, I have customized the Boolean trigger to only EXECUTE the trigger on a small fraction of the 500 daily trigger fire events.

Please keep in mind that I have 13 wireless clients generating the 500/day UDP trigger count. I would suspect that if you have 1/2 the wireless clients, you would have only 1/2 the UDP trigger messages.

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

The above is one method for PASSIVELY tracking your wireless clients (the WAP SENDS TO YOU) when something joins or leaves your network.

For ACTIVELY tracking...
Using PHSOCKETS (I think Dave is still squashing a few bugs) and telnet (if your WAP supports it), can allow you to you directly querying your "WAP client info") and you can them looks at what MAC addresses are connected whenever you choose to do so.

Another side note - I have found that turning on/off my IPhone Wi-Fi causes the UDP info as well as the PHsockets/telnet data to be updated instantly...no delay or cached information that can cause other tracking approaches to mis-behave.

__________________
Elk - Insteon - BlueIris - DMC1 - PowerHome - XLobby - HA_Bridge w/Dots - Brultech
Back to Top View smarty's Profile Search for other posts by smarty
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum