Author Topic: HomeSeer Home Automation  (Read 1119 times)

gergmchairy

  • Newbie
  • *
  • Posts: 4
HomeSeer Home Automation
« on: May 03, 2010, 01:27:56 PM »
Evening everyone, is anyone (else) using an IO-204 as a data aquision device for Homeseer?
So far, I have the IO-204 (with a light sensor & temp sensor) enabling/disabling the lighting in my house - it also tells homeseer the current inside temp... (later integration with the heating me thinks!)
It does seem a bit mad to have data within my house (in the UK) to be travelling via Massachusetts but it works!! :-)

I have a widget setup on my iobridge desktop to display the data I'm after, Homeseer is set to poll the iobridge website every 5 minutes to get data, using the getURL command - it then updates the status of the devices involved.
In my case if the light level falls below 940 then it enables a device called 'night status'.
so when a room movement sensor is activated and 'night status' is on then the lights turn on, simple! :-)

Here's the code from my homeseer temperature gauge as an example:

Sub Main

'inside temperature
hs.setdevicestring "S4", hs.getURL("http://www.iobridge.com", "/widgets/static/id=xxyyzz", False, 80)
hs.SetDeviceLastChange "S4", Now()

End Sub

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 668
    • ioBridge Support
Re: HomeSeer Home Automation
« Reply #1 on: May 09, 2010, 01:02:54 PM »
Very cool project. Thanks for posting the hook into HomeSeer.

What HomeSeer setup do you have at your house? Can you describe that? I might add this snippet of code to the Wiki.
ioBridge Support
Community Team

gergmchairy

  • Newbie
  • *
  • Posts: 4
Re: HomeSeer Home Automation
« Reply #2 on: May 11, 2010, 09:08:28 AM »
Hello again,

I have homeseer setup primarily to reduce electricity consumtion.
It does this a few ways:

1. Occupancy detection.   I have a house occupied switch (via IO204) which when on: (using Zwave) applies power to my AV Kit & TV's etc.  (except sky+ which needs power 24/7). 

When I go out, flick the switch & homeseer gracefully powers everything down to standby - then kills the power altogether after a minute or so.

2. The IO204 (light sensor) tells homeseer if its dark outside, in which case the room ceiling lights are enabled.. each room has movement sensors so the lights come on/off automatically if a. the occupancy switch is on & b. it's dark enough to warrant it!

3. Bedtime.  On hitting a bedside button (another IO204 switch), homeseer turns off all the AV Kit (except the bedroom, which is on a 1 hour timer)  The movement sensors are still enabled, but instead of waking the house when you get up in the night, only table lamps / bedside lights are operated when movement is detected.

4. Because I'm lazy, when I get home during the week - on turning on the occupancy switch (between set times), the AVKit in the lounge is turned on and tuned to my favourite radio station and the sonos zone in the kitchen is powered up & set to the line in from the living room..
If it's winter, the lights will also now be on.

Thats is in a nutshell, I'll put my code for the light sensor on later (I'm at work now!)  Hope it gives folks inspiration for their own projects! 

Greg

PS. Feel free to copy my code for the Wiki :-)

iobridge

  • Administrator
  • Hero Member
  • *****
  • Posts: 668
    • ioBridge Support
Re: HomeSeer Home Automation
« Reply #3 on: May 11, 2010, 12:45:38 PM »
Very nice implementation...hopefully everything does cut down on energy consumption. Let us know about the light sensor code. I will add this info to the Wiki. Thanks!
ioBridge Support
Community Team

gergmchairy

  • Newbie
  • *
  • Posts: 4
Re: HomeSeer Home Automation
« Reply #4 on: May 11, 2010, 05:12:06 PM »
This is the script I've used for the sensors..

The variable 'iobridge' is the value from the light sensor, if its <940 then the homseer device 'S3' is set to On, if its >960 then 'S3' is off. (The difference between the 2 allows for fluctuations - ie clouds!) If the module is 'Offline' then the device is set to 'Unknown'
The variable 'iobridge2' is from the temperature sensor

Greg

'--------------------------------
'IO-204 Homseer Sample Code
'--------------------------------

Sub Main

'--------------------------------
'get the data from the IO-204
'--------------------------------

iobridge = hs.getURL("http://www.iobridge.com", "/widgets/static/id=xxyyzz1", False, 80)
iobridge2 = hs.getURL("http://www.iobridge.com", "/widgets/static/id=xxyyzz2", False, 80)

'--------------------------------
'check the data to see if the IO-204 is online
'--------------------------------

If iobridge = "Offline" Then

'--------------------------------
'if offline, update accordingly
'--------------------------------

hs.setdeviceStatus "S3", 17
hs.setdeviceString "S3", "Offline"
hs.SetDeviceLastChange "S3", Now()

hs.setdeviceStatus "S4", 17
hs.setdevicestring "S4", "Offline"
hs.SetDeviceLastChange "S4", Now()

Else

'--------------------------------
'IO-204 is online
'Update 'Night-Time' (S3 Status)
'--------------------------------

If iobridge > 960 Then

hs.setdeviceStatus "S3", 3
hs.setdeviceString "S3", "Off, " & iobridge

End If

If iobridge < 940 Then

hs.setdeviceStatus "S3", 2
hs.setdeviceString "S3", "On, " & iobridge

End If

hs.SetDeviceLastChange "S3", Now()

'--------------------------------
'inside temperature
'--------------------------------
 
hs.setdevicestring "S4", iobridge2
hs.SetDeviceLastChange "S4", Now()

'--------------------------------
'write the figures to homeseer log
'--------------------------------


hs.writelog "io204-weather", iobridge & " " & iobridge2

End If

End Sub

'--------------------------------
'© Greg Macaree MMX
'--------------------------------