It's installed. Now what?

General discussion about Open Source Automation
Post Reply
Message
Author
Synthesis
Posts: 10
Joined: Thu Sep 25, 2014 6:03 pm

It's installed. Now what?

#1 Post by Synthesis » Mon Sep 29, 2014 6:18 am

Before I get too far into this, I'll just lay out the groundwork so that we are all on the same page.

I'm a hardware guy. I am an IT Professional (Windows/Mac/Active Directory Systems Administrator) who knows SAN/NAS/Networking/Servers and everything in a hardware stack.

I can build a complete server rack from the ground up and configure it in my sleep.

Programming leaves me flabbergasted though.

The specific functions I'm looking for fit the following scenarios:
Automatic night lights after dark (Hallway lights come on to 25-30% from motion sensors after 10PM)
Location awareness from both inside and outside of the home. I'd like my exterior lights to kick on when I turn on to my street after dark, and turn off a couple of minutes after I enter the home. The same behavior would repeat when my wife turns on to the street as well.

Pushing a button to control a light is awesome, and I have that aspect working including a main screen with a couple of lights on it.
But now I don't know what to do.

How do I make Bluetooth recognize the phones? How can I get the automation aspect working?

My wife is OK with me doing this, as long as it doesn't cost money.
I can fit the light switches, etc into the home maintenance budget as "needed replacements" for all of the 30+ year old light switches in the home if I do them one or two at a time.
Software, on the other hand, is expensive, and OSA seems to have everything I need.

But again, I am not a programmer, I don't know where to go from here.
Are there any how-to guides that lay things out for non-devs like me?

Automate
Posts: 1691
Joined: Sat Dec 11, 2010 1:44 pm
Location: US

Re: It's installed. Now what?

#2 Post by Automate » Mon Sep 29, 2014 6:46 am

Turning lights on at night is fairly easy. Set up your Weather Underground plugin (see the Wiki for info). It has a Day / Night events that can trigger a simple OSA script. The script will turn on/off the lights.

Bluetooth has a limited range so it will generally only work inside the house.

Probably the best way to detect your car is close to home is with a smartphone. What smartphone do you and your wife use? If Android, then you can use a program caller Tasker https://play.google.com/store/apps/deta ... kerm&hl=en to tell OSA that you arrived or left home.

Synthesis
Posts: 10
Joined: Thu Sep 25, 2014 6:03 pm

Re: It's installed. Now what?

#3 Post by Synthesis » Mon Sep 29, 2014 6:55 am

Thanks for the prompt reply Automate.

Yes, we both run Android.
I have Tasker installed on both.

I'd only want the "Welcome Home" program (on OSA) to run after dark.
How do I configure WU? It is active in the plugins list, but I guess I just am not aware of how to get it set to my location.

Right now I run IFTTT (www.ifttt.com) for performing a variety of tasks on my phone, and would love to interface it with OSA or similar apps.
I have GeoLocation awareness so that when I enter or leave an area my ringer auto turns on/off, etc.

As for in-home presence detection with Bluetooth.... Yeah, I'd only want it so that the system would know when I or my wife were home. I'm not 100% sure how to get the phones in to OSA so that is can poll for us. Is it MAC based? IP based with the Network Scan? How is it set up?

User avatar
kherron
Posts: 642
Joined: Mon Dec 05, 2011 10:44 am
Location: Jacksonville, Fl.
Contact:

Re: It's installed. Now what?

#4 Post by kherron » Mon Sep 29, 2014 9:51 am

For starters, go to http://wunderground.com Type in your zip code or location.

In the map, you can hover over all the weather stations close to your location.
Zoom In if necessary to find the one closest to you.
As you hover over the weather station, it will display its Station ID. Write this down.

Now, go to the OSA Web UI Objects page.
Make sure you have a WUnderground object and a Weather object
If not, create them.

On the Wunderground object, Click on the "PWS" property and set it to the Station ID you wrote down and click save!
Set the state to Running if not already!
Then click on the "Update" method.

Now you should be able to click on the Weather object, and start seeing information!

Andre
Posts: 26
Joined: Tue Jul 08, 2014 6:29 am

Re: It's installed. Now what?

#5 Post by Andre » Tue Sep 30, 2014 3:28 am

Assign your phones some Static IP's on your home network.

In OSA there is a plugin called Network Monitor and you can create objects for your Android Phones as "Network Devices" and put the IP's in the Address field.

The Network Monitor will then ping your phone and OSA will change the State of your android phone device to "On-Line" or "Off-Line"

Vaughn
Site Admin
Posts: 1432
Joined: Thu May 13, 2010 2:17 pm

Re: It's installed. Now what?

#6 Post by Vaughn » Sat Oct 11, 2014 12:02 pm

As for Bluetooth phones, when you pair the phone to the computers, the plugin will see the phone and should add a new Object for the phone, which you can then rename.

I really thought the phone would solve a lot of issues for me, but the initial logic I put in did not work. Even with the phone plugged in, it would disconnect and reconnect, so I could not base anything solely on whether the phone was checking in or not. Even logic like "If the house is in away mode, and you see the phone, consider me here and disarm." Well, that is a problem because after I arm the system and I am going to the car, it still sees my phone, so then I have to track when I am truly gone, and the more you put in like that the less reliable and harder to trouble shoot the logic becomes.

Knowing when a Place or room is occupied and sealed is important. For example logic like this: Bathroom door closed, then bathroom motion means someone is in the bathroom, and they CANNOT leave without opening the door, so regardless of sensors in the bathroom, it knows the bathroom is occupied. Well, the same concept can be applied to a house, ie, Vaughn is in the house, the doors have not opened, and Vaughn's phone went off line. Well Vaughn is still in the house, so he MUST be here no matter what the phone says. Now if the phone goes offline, and the house was exited in the last 5 minutes, then it is possible, but not guaranteed that Vaughn left. So hopefully you can design logic, regardless of programming, that will work for you.

My day job contracted ended and I am working on OSA full time again as of today, so I will be working on this topic myself. Let me know if I can help.


Vaughn

Post Reply