Jump to content
C4 Forums | Control4

Detect when a device connects to Wifi


roads

Recommended Posts

Just thinking about interesting things that you could do with home automation and Control4 I am wondering if anyone knows whether it is possible to have Control4 detect when a device with a particular MAC address attaches to your Wifi network? This would be a great way to have the system respond to someone arriving home - turning on lights, music, etc, since most people (at least those with Control4) carry smartphones now that automatically attach to a home network when they come into range.

Link to comment
Share on other sites


Nothing built-in to C4.

I can imagine two approaches:

1) A driver that integrates with the access point (probably via syslog) to monitor for the event. I'm not sure What the event looks like in my access point.

2). Integrate with a network based IDS like snort to monitor the events.

Link to comment
Share on other sites

This is a fantastic idea. I use alarm keypads coming and going for this sort of event automation. It's one of the most useful things in my project. Even better, If such an app could actually specifically recognize which phone logged on: wife vs hubby vs daughter vs boyfriend....:cool: the possibilities for this are endless. But I think the wifi login event trigger, would perhaps have to be linked with something else...like a door or garage reed switch to avoid false alarms and for added security... But great idea! :)

Link to comment
Share on other sites

Here's how I see something like this working:

1. A PC or Mac program monitors for syslog events.

2. When a syslog event occurs, the PC or Mac program sends an action (or triggers a macro) on the C4.

Configuration of the syslog monitor would contain "syslog event string to match" with a corresponding "C4 macro to trigger". It's actually very easy to do.

The big assumption is that you have a device that is able to generate the syslog even you are looking for.

Could also do this for Growl.

Link to comment
Share on other sites

2. When a syslog event occurs, the PC or Mac program sends an action (or triggers a macro) on the C4.

Interesting possibilities here if you could do some integration with an external computer. How would the above work? Would you be stuck with something like the Twitter driver for receiving events or is there a more direct way?

Link to comment
Share on other sites

I've never used the twitter driver. Does it monitor a twitter feed and rake action based on the results? Or does it just display the tweet on one of the C4 interfaces?

As I said, the syslog monitor would contain a list of regular expressions. When there is a match, it could trigger and action.

Regular Expression 1 do Macro 1

Regular Expression 2 do Macro 2

Regular Expression 3 do Macro 3

Get it?

Link to comment
Share on other sites

It monitors a twitter and account and executes programming based on the "tweet" it receives.

The problem is that it isn't instant, it polls the twitter account for new messages at a set interval, not recommended to be more frequent than every 10 minutes. You'd need something to respond much quicker for this to be of much value...

Link to comment
Share on other sites

Great idea!

It would be great if the house could identify who is coming home by the time they reach the driveway. Executing actions based on that... I cant really think of any ideas that would be person-specific at my house, what were you guys thinking of?

Link to comment
Share on other sites

I think I found a way to perform this. Here is a mobile program that can send a text or email once you reach a specific location:

http://www.engadget.com/2010/07/12/geocron-lets-latitude-automate-your-life-or-at-least-your-wife/

You could then use that email/text/tweet to execute a specific action on the controller. Now we just need to figure out how to push the text instead of pull for it every 10 minutes.

Link to comment
Share on other sites

It would be easy on windows mobile device and probably Android to have a small app running in the background that, once connected to the wifi network could call a web page running on a local machine, which could then interact with C4 using IP commands. Would be easy enough to do, but may be a bit of pain to package up.

Link to comment
Share on other sites

As I said, the syslog monitor would contain a list of regular expressions. When there is a match, it could trigger and action.

Regular Expression 1 do Macro 1

Regular Expression 2 do Macro 2

Regular Expression 3 do Macro 3

Get it?

Sorry. My question wasn't clear. I understand how you might do the computer (PC/Mac) side. My question was intended to be: how does the macro communicate with Control4? Is there some existing capability or would it require developing a Control4 driver to interact with the computer? I'm guessing the latter... :(

Link to comment
Share on other sites

The best case would be a generic IP based driver that took command input in and set a variable = to the supplied command. Haven;t been down this road in any detail but I would imagine this would be possible since Composer programming is LUA based in 2.0+.

This would allow for an "When variable changes event" and all the custom command interpreter code to exist in Composer programming.

In this way the customer would not need to know anything about drivers.

Link to comment
Share on other sites

It is easy for the Mac/PC monitor to send commands to control4. Look at some of my previous posts on the C4 Soap API. You can send a command simply by telnetting to the C4 controller.

Link to comment
Share on other sites

It is easy for the Mac/PC monitor to send commands to control4. Look at some of my previous posts on the C4 Soap API. You can send a command simply by telnetting to the C4 controller.

I remember there was some concern that this would no longer be possible with 2.0, can we safely say it does still work?

Link to comment
Share on other sites

  • 2 weeks later...

Every device has a unique MAC address so it could be person/device specific. My idea was to have a particular music playlist start up for the person arriving but I suppose there are lots of possibilities.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.