PDA

View Full Version : Interface NR to MisterHouse



Danal Estes
April 18th, 2004, 05:59 AM
I run MisterHouse (see http://www.misterhouse.net) for general home automation. When installing NetRemote, I desired to interface to MH for lighting control. While I plan to work up a two-way interface, and document better at some point, here's enough to get started:

1) In your MisterHouse mh.private.ini file:
server_NetRemote_port=4997

2) Create a NetRemote.pl with at least:
$NetRemote = new Socket_Item("Status\n\r", 'Status', 'server_NetRemote');

Suggested code for NetRemote.pl:
# Diagnostic Code
if (active_now $NetRemote) {
my $client = $Socket_Ports{'server_NetRemote'}{client_ip_addres s};
print_log "NetRemote session opened for $client";
}
if (inactive_now $NetRemote) {
my $client = $Socket_Ports{'server_NetRemote'}{client_ip_addres s};
print_log "NetRemote session closed for $client";
}

And, an example of how to take an action based on a remote button:
# Handle input from the remote
my $data;
if (defined($data = said $NetRemote)) {
print_log "Netremote data $data";
$data =~ s/ *\r\n?$//;
set $Kitchen_Island_Light ON if $data eq 'Kitchen ON';
set $Kitchen_Island_Light OFF if $data eq 'Kitchen OFF';

}
3) In NetRemote File->Properties->Plugins, create a "Generic" instance. This will default to -20.Be sure and set the IP address to your MisterHouse machine (NOT your Girder or HTPC).
Set the port number to whatever you picked above in (1), and set timout to 100 or so.
No 'msg' file is required, but you could use one if you desire.
4) Create buttons that have an IR action. The IR action must:Have an IR code of 5001 0000 0000 0002 ffec 0000 0000 0000
Note: 'ffec' maps to instance -20. If you change the instance number, change this to the signed 16 bit equivalent.
Have a name that is passed to MH.
Note: The name is returned by MH 'said' method; it is case sensitive.
Given the example code snippet above, valid IR action names would be 'Kitchen ON' and 'Kitchen OFF'.
There are MANY variants of this; just for two examples: I'm ignoring MH state support that's built in to the object... this could be used for hooked/triggered behaviors; ditto for the NR side and the MSG file.

That's it for now...

Danal

P.S. There is a known bug in NR 0.995 RC7. When exit & restart NR, the IP address in the generic plugin is truncated. Reset it to the correct address of the MH machine, and all works again...

Aaron
April 18th, 2004, 08:23 AM
Have you looked at Homeseer (http://www.homeseer.com)?

Homeseer is very powerful and can do a ton! There already exists a fully functional interface for NR into Homeseer (via the Girder plug-in) and Georgep is making it better almost daily since he is a great coder and already contributes to the Homeseer software.

I suggest you check it out... it will be the best $150 you spend on your home automation, hands down!

Danal Estes
April 18th, 2004, 10:01 AM
Aaron,

Not to start a flame war here... but I originally picked MH several years ago because of lack of support for unusual or rare hardware devices in any commercial product.

For example, does Homseer support the Stanley Garage door sensors? They use a non-standard and undocumented extended X10 code. They are also no longer manufactured... so it is unlikely any commercial software vendor will invest in writing a driver for them. At the time that I picked them, they were, of course, being manufactured. Writing a MH drive took just a day or so.

Does it interface with a DSC Alarm System? Via the DSC-PC5400 printer module? Again, about 1-2 days of code.

Does it feature Voice output? Probably does, many packages do. Does it have 'hooks' into the voice code so that you can use an RS-232 based controller (any of several) to switch relays and therefore decide in what rooms the voice is heard? The individual script syntax is
speak(volume => 10, rooms=>master,office text => "Spoken in two rooms only"); and the 'hook' for RS232 is already built in - it does require adding the individual RS232 commands for your particular type of relay board....

Does it support the Jandy Aqualink intelligent swimming pool controller? Fully, including the status updates?

Tell me that HomeSeer does those 4 things (Garage Door extended X10, DSC alarm, Voice w/relay board support, and Jandy Aqualink), and tell me that either I can write new drivers/support and/or that the software vendor will always write one, within a few weeks, for whatever whacko hardware I add... all for my original fee.

Oh, I forgot, does it recieve/parse logs from Netgear routers?

Tell me that, and I'm and I'll take a serious look. If it also does all the 'regular' things I'd expect any such package to do (web interface, download parse web pages, X10 support, arbitrary TCP/IP support, etc.) then I'm a customer.

Again, not trying to start a war or saying that HS is a good/bad product. I have looked at the web site and it looks very comprehensive and flexible. If I were going to run commercial software, it would be on my short list for serious evaluation. For many folks this makes it the right answer.

Danal

Aaron
April 18th, 2004, 01:20 PM
Danal,
You may seriously want to look at Homeseer. From my experience Homeseer does what you want and about 100 times more, you should see the other features is has!

I did a quick search (http://ubb.homeseer.com/eve/ubb.x?a=search&s=697298074&reqWords=Stanley+Garage+door+) and found lots on Stanley Garage door controls.

The people using Homeseer generally range from "turn the lights on" users to blind people (yes, really!) that automate and control the entire house. I've been told what I do with my system is equal to a Phast or AMX worth about $20k! I've spent $3k on my HA hardware/software at best.

If you are happy with MisterHouse (I'm sure it is a fine application) then I say stick with it. If you want the best supported semi-DIY Home Automation package with the largest user community (may are good coders and scripters and give away code or sell it cheaply) then I suggest you take a good look at Homeseer.

You can see some example pages from my site http://members.cox.net/alevey . I use ASP for most of it and I'm trying to move to Netremote for the entire front end. I utilize approx 20% of Homeseer's capabilities.

I only use Homeseer & Netremote and control my entire house...
Here's a quick rundown of my setup:

Hardware:

SimPad
- WindowsCE .net 4.1, 800x600, 64k color, 802.11b wireless touchscreens
HomeSeer Server
- P3 500 MHz PC, 384MB RAM, 20 GB Hard Drive
- USB-UIRT for IR output to A/V system from Homeseer/Netremote
Niles MRZ6
- 6 zone controls for: audio distrobution, volume control, & IR distrobution (audio & IR for rooms / IR for home theater)
Niles SI1230
- 12 channel, 30 watt per channel amplifier for audio zones (rooms)
Marantz AV560 preamp & tuner - Digital Dolby & DTS (home theater and rooms)
Parasound 1205a - 5 Channel, 140 watts per channel (home theater)
JBL speakers (home theater)
Velodyne 15" sub (home theater)
In-Ceiling speakers w/ IR receivers (rooms)
- Master Bedroom, Master Bath, Living Room, & Backyard
AcoustiMagic Microphone (Voice Recognition controlled by Homeseer)
- available in Living Room, Dining Room, Family Room, & Kitchen


Software:

Netremote
(run on Simpad wireless Windows CE device and PC)
- home theater control and display of home automation control web pages
- Netremote IR service running on server
Homeseer
(utilizes my HACT script/asp package)
- voice recognition
- control of home (appliance, lighting, security, timed events, etc)
- tv guide
- weather guide
- local movie theater guide
- yahoo lookup guide

either way, i just thought i'd suggest you look at it.

enjoy

Danal Estes
April 18th, 2004, 04:24 PM
Somehow this has turned into a comparison of two Home Auto packages, both good. Since this is the NetRemote forum, thanks for the tip! It's nice to know that there is a Homeseer interface to NR. If I switch home auto packages, Homeseer will be on my short list for serious evaluation.

For anyone who happens to run MisterHouse, see first post. :D

Danal

Ben S
April 20th, 2004, 04:23 AM
Nice job Danal!

I've never run MisterHouse, but I'll check it out in the future if I end up setting up another linux box in the house.