#13015 - 01/20/04 04:10 PM
Misterhouse
|
David Norwood
newbie
Registered: 11/20/03
Posts: 11
Loc: Thousand Oaks, CA
|
I thought I would start a thread about the open source home automation package, Misterhouse. It is written in perl and runs on Windows, Linux, and other Unices. I wrote the Ocelot interface for Misterhouse which uses cpuxad to actually talk to the serial interface. Neil Cherry got cpuxad (part of xalib) to compile under cygwin, so Windows users are now supported.
What I like about Misterhouse is you can bring all sorts of variables together in one place. It's easy to program something crazy like "if motion is detected outside and it's raining and the moon is full, then e-mail me an image from the webcam". You can control things by voice, web, IR, e-mail, telnet, WAP, you name it.
You really need to be able to write perl scripts to use Misterhouse effectively, but there is an active user e-mail list to help if you get stuck.
Misterhouse Home Page
David
|
|
Top
|
|
|
|
#13016 - 01/22/04 05:47 AM
Re: Misterhouse
|
Salil Athalye
journeyman
Registered: 11/30/03
Posts: 59
Loc: Rochester, NY, USA
|
Is there a binary for the daemon in Windows, or do I have to load cygwin and compile it? David, did you try and write the Ocelot interface without using cpuxad? Would it work? I have been trying to modify the framework to eliminate the need for cpuxad on Windows. So far I can get X10 messages from Ocelot to be reported in Misterhouse and update icons etc, but having difficulty sending messages out to Ocelot to send X10. I get the <6 0 6> response back but it seems like the Ocelot never sends the command out on the powerline.
The other issue is that the <6 0 6> ack gets interspersed with the 254 hc kc, 254 hc command messages, so this increases the complexity.
I was ready to go and buy Homeseer so it was fortuitous that I saw your message. I might take the time and get cpuxad to work and call it a day.
Sal
|
|
Top
|
|
|
|
#13017 - 01/23/04 04:11 AM
Re: Misterhouse
|
Neil Cherry
junior
Registered: 01/17/03
Posts: 37
|
Get ready for irony ...
First the link you need is Linux Home Automation page (OK, so it's only the xalib binary, but you get the idea) the file is Tar'd & Gzip'd (WinZip should handle it just fine). Weird, I thought I had information on my CPUXA page. I'll have to update that. I haven't used it in a while (note, I use Linux ;-) ) anyway if it blows up let me know I did have some trouble with it at one point and it's pretty picky about it's options. I won't be able to touch it until this week end. My machine is now WIN2k (the original WINME blew up wiping out my CYGWIN environment) but I still have a WIN98 machine.
|
|
Top
|
|
|
|
#13018 - 01/23/04 05:19 AM
Re: Misterhouse
|
Salil Athalye
journeyman
Registered: 11/30/03
Posts: 59
Loc: Rochester, NY, USA
|
Neil, I downloaded the tgz and installed cygwin. The next step is to compile everything in the xalib directory? Then would I need to bring up a cygwin bash shell to run the daemon, or would it be a regular windows program that I can run. BTW, do you have any pointers to docs that would help with the compilation process and how to invoke the daemon.
Thanks,
Sal
|
|
Top
|
|
|
|
#13019 - 01/23/04 03:13 PM
Re: Misterhouse
|
Salil Athalye
journeyman
Registered: 11/30/03
Posts: 59
Loc: Rochester, NY, USA
|
Sorry. I failed to realize you were talking about the binary package. I just downloaded it and will give it a try. The previous one I was refering to was the source code.
Thx
Sal
|
|
Top
|
|
|
|
#13020 - 01/23/04 06:58 PM
Re: Misterhouse
|
Salil Athalye
journeyman
Registered: 11/30/03
Posts: 59
Loc: Rochester, NY, USA
|
Neil, What command line parameters do you use to start the daemon. I have the Ocelot on COM3. When I try to start the daemon using --comport COM3 I get a message saying serial open: not a typewriter. When I use --comport COM3 --speed 9600 I get the help message.
|
|
Top
|
|
|
|
#13021 - 01/23/04 07:38 PM
Re: Misterhouse
|
Salil Athalye
journeyman
Registered: 11/30/03
Posts: 59
Loc: Rochester, NY, USA
|
I am really close to dumping Misterhouse and buying HomeSeer which has a module to communicate with the Ocelot.
|
|
Top
|
|
|
|
#13022 - 01/24/04 04:17 PM
Re: Misterhouse
|
David Norwood
newbie
Registered: 11/20/03
Posts: 11
Loc: Thousand Oaks, CA
|
Try adding a : after COM3.
David
|
|
Top
|
|
|
|
#13023 - 01/25/04 04:21 PM
Re: Misterhouse
|
Neil Cherry
junior
Registered: 01/17/03
Posts: 37
|
[QUOTE]Originally posted by Salil Athalye: [qb]BTW, do you have any pointers to docs that would help with the compilation process[/qb][/QUOTE]To make the project just type make in the xalib-0.48 directory. You should see no errors (but you will see a couple of warnings).
I'm working on some kind of documents should have them soon (tonight, I hope)
|
|
Top
|
|
|
|
#13024 - 01/25/04 05:30 PM
Re: Misterhouse
|
Neil Cherry
junior
Registered: 01/17/03
Posts: 37
|
Sorry for the delay, I'm currently working on what I hope will be an article in Circuit Cellar. I've been fighting with Java, Applets, security and packages. I finally found ant, had I found that earlier I would not have wasted the last 2 days. Oh well! I now think I understand the .java.policy file well enough to deal with that. Afterwards I'll need to learn about Sun's Java Web Start, I just don't have that much time right now.
Anyway, remember that cpuxad is a Unix program and so it behaves a little weird with respect to Windows. One thing you should find useful is that all the commands have a --help option. Sorry about the lack of docs. My WIN98me was wiped out in a system crash. That was the machine I compiled this on.
[QUOTE]cpuxad --help[/QUOTE]Will result in this:
[QUOTE]cpuxad 0.48 usage: cpuxad [-option] [arg]... where: -a|--access [file] access control file -b|--log also log to stderr -c|--chroot perform change root -d|--daemon daemonize -f|--logname [file] log to file -H|--host [addr] host IP address for daemon -L|--lock [file] use lockfile [file] -m|--msg cpu-xa ascii messages --port [port] bind server to port -p|--tcpport [port] bind server to port --com [com] com port Ocelot is connected to -P|--comport [com] com port Ocelot is connected to -s|--speed [speed] speed to set com port to -v|--vebose informational messages -V|--version Version info -?|-h|--help This help screen [/QUOTE]Here is a command line that works on my machine: [QUOTE]cpuxad.exe -d -a cpuxad.access -f log -L LCK..ocelot --com /dev/com1[/QUOTE]First, note the weird comport name: COM1 is /dev/com1. Second if this runs then test it by doing the following:
[QUOTE]nxacmd -G nxacmd -S nxacmd -G[/QUOTE]This will, first, give you the time that the Ocelot uses. Then you will set the Ocelot's time to match that of the PC. Then you will read it back.
BTW, the format of the cpuxad.access file is very simple. One ip address or hostname per line.
I've recompiled the Windows Binary xalib-0.48_bin.tgz binary, put it in a tgz file and I've included my xalib.bat and a cpuxad.access file. The xalib.bat will start up a new cmd window (minimized). This should allow you to double click on it and not have a nasty window cluttering up your desktop. This was the closest I could come to Unix's background mode. I hope this helps!
|
|
Top
|
|
|
|
#13025 - 01/27/04 01:16 PM
Re: Misterhouse
|
David Norwood
newbie
Registered: 11/20/03
Posts: 11
Loc: Thousand Oaks, CA
|
Neil,
I checked cpuxad.c and found the speed argument is not implemented. Maybe you should remove it from the usage doc. The speed is always 9600 baud anyway, right?
David
|
|
Top
|
|
|
|
#13026 - 01/28/04 05:16 AM
Re: Misterhouse
|
Neil Cherry
junior
Registered: 01/17/03
Posts: 37
|
I didn't notice, but you are correct the Ocelot (and family) work at 9600 anyway. BTW, have you tried the Set/Get variables on >=2.0 ? I can't seem to set anything or am I getting the variable back wrong?
|
|
Top
|
|
|
|
#13027 - 02/28/04 02:35 PM
Re: Misterhouse
|
Bruce Slawson
newbie
Registered: 05/10/03
Posts: 4
Loc: Palmdale, CA
|
Has anyone been able to compile xalib under Mac OS X? I tried and got quite a few errors. I thought I would ask the question before I spent a lot of time working on it.
Thanks, Bruce
|
|
Top
|
|
|
|
#13028 - 03/02/04 08:50 AM
Re: Misterhouse
|
Neil Cherry
junior
Registered: 01/17/03
Posts: 37
|
What errors did you get? We should be able to help you figure out how to tweek the software. I can probably get it to run on an old 3B1 or 3B2 (dates back 15 years or so).
|
|
Top
|
|
|
|
#13029 - 03/02/04 06:49 AM
Re: Misterhouse
|
Karl Denninger
junior
Registered: 01/09/03
Posts: 46
Loc: Niceville, FL
|
Most of the differences between System V based Unices and BSD-based ones are in the IOCTLs, which are used to do things like set baud rates on serial ports.
There are a few other differences as well (signal handling, etc) but for the most part porting between them is not difficult.
|
|
Top
|
|
|
|
#13030 - 03/02/04 01:21 PM
Re: Misterhouse
|
Bruce Slawson
newbie
Registered: 05/10/03
Posts: 4
Loc: Palmdale, CA
|
This is what I get when building undeer Mac OS 10.3.
[slawsonb@whisper:~/Desktop/xalib-0.48] $ make gcc -O2 -fomit-frame-pointer -Wall -c -o serial.o serial.c serial.c: In function `serial_init': serial.c:91: error: `OLCUC' undeclared (first use in this function) serial.c:91: error: (Each undeclared identifier is reported only once serial.c:91: error: for each function it appears in.) serial.c:92: error: `OCRNL' undeclared (first use in this function) make[1]: *** [serial.o] Error 1 gcc -g -Wall -O2 -fomit-frame-pointer -I../lib -I. -DXA_PORT=3000 -DXA_HOST=""localhost"" -DXA_VER=""0.48"" -DXA_DEV="/dev/ocelot" -DXA_LOCK="/var/lock/LCK..ocelot" -DXA_ACCESS="/usr/local/etc/cpuxad.access" -DXA_CHROOT="/usr/local/lib/cpuxad" -DXA_LOG="/var/log/cpuxad" -c cpuxad.c cpuxad.c:12:20: malloc.h: No such file or directory cpuxad.c:46: warning: built-in function `log' declared as non-function cpuxad.c: In function `main': cpuxad.c:1267: warning: unused variable `endptr' cpuxad.c:1268: warning: unused variable `c' make[1]: *** [cpuxad.o] Error 1 gcc -o nxacmd nxacmd.o file.o -L../../lib -lcpuxa ld: can't locate file for: -lcpuxa make[2]: *** [nxacmd] Error 1 gcc -g -O2 -I../lib -fomit-frame-pointer -o nxacpl nxacpl.o -L../../lib -lcpuxa -lm ld: can't locate file for: -lcpuxa make[2]: *** [nxacpl] Error 1 gcc -g -O2 -fomit-frame-pointer -Wall -o nxaephem nxaephem.o ephem.o -L../../lib -lcpuxa -lm ld: can't locate file for: -lcpuxa make[2]: *** [nxaephem] Error 1 gcc -g -O2 -fomit-frame-pointer -Wall -o nxalir nxalir.o -L../../lib -lcpuxa -lm ld: can't locate file for: -lcpuxa make[2]: *** [nxalir] Error 1 gcc -o nxamon nxamon.o -L../../lib -lcpuxa ld: can't locate file for: -lcpuxa make[2]: *** [nxamon] Error 1 gcc -g -O2 -fomit-frame-pointer -Wall -o nxamsg nxamsg.o -L../../lib -lcpuxa -lm ld: can't locate file for: -lcpuxa make[2]: *** [nxamsg] Error 1 make[1]: *** [subdirs] Error 2 make: *** [subdirs] Error 2
|
|
Top
|
|
|
|
#13031 - 03/08/04 04:43 PM
Re: Misterhouse
|
Neil Cherry
junior
Registered: 01/17/03
Posts: 37
|
[QUOTE] gcc -O2 -fomit-frame-pointer -Wall -c -o serial.o serial.c serial.c: In function `serial_init': serial.c:91: error: `OLCUC' undeclared (first use in this function) serial.c:91: error: (Each undeclared identifier is reported only once serial.c:91: error: for each function it appears in.) serial.c:92: error: `OCRNL' undeclared (first use in this function) make[1]: *** [serial.o] Error 1[/QUOTE]Ok here is the first problem, we are missing settings used by tcsetattr. Do a man tcsetattr and make sure the include files are in serial.c. [QUOTE] gcc -g -Wall -O2 -fomit-frame-pointer -I../lib -I. -DXA_PORT=3000 -DXA_HOST=""localhost"" -DXA_VER=""0.48"" -DXA_DEV="/dev/ocelot" -DXA_LOCK="/var/lock/LCK..ocelot" -DXA_ACCESS="/usr/local/etc/cpuxad.access" -DXA_CHROOT="/usr/local/lib/cpuxad" -DXA_LOG="/var/log/cpuxad" -c cpuxad.c cpuxad.c:12:20: malloc.h: No such file or directory [/QUOTE]This one is more obvious, do a man malloc, make sure all the incudes are in cpuxad.c. [QUOTE] cpuxad.c:46: warning: built-in function `log' declared as non-function [/QUOTE]Change all references of log to mylog. [QUOTE] cpuxad.c: In function `main': cpuxad.c:1267: warning: unused variable `endptr' cpuxad.c:1268: warning: unused variable `c' [/QUOTE]Ignore these 2, they're harmless. [QUOTE] make[1]: *** [cpuxad.o] Error 1 gcc -o nxacmd nxacmd.o file.o -L../../lib -lcpuxa ld: can't locate file for: -lcpuxa make[2]: *** [nxacmd] Error 1 gcc -g -O2 -I../lib -fomit-frame-pointer -o nxacpl nxacpl.o -L../../lib -lcpuxa -lm ld: can't locate file for: -lcpuxa make[2]: *** [nxacpl] Error 1 gcc -g -O2 -fomit-frame-pointer -Wall -o nxaephem nxaephem.o ephem.o -L../../lib -lcpuxa -lm ld: can't locate file for: -lcpuxa make[2]: *** [nxaephem] Error 1 gcc -g -O2 -fomit-frame-pointer -Wall -o nxalir nxalir.o -L../../lib -lcpuxa -lm ld: can't locate file for: -lcpuxa make[2]: *** [nxalir] Error 1 gcc -o nxamon nxamon.o -L../../lib -lcpuxa ld: can't locate file for: -lcpuxa make[2]: *** [nxamon] Error 1 gcc -g -O2 -fomit-frame-pointer -Wall -o nxamsg nxamsg.o -L../../lib -lcpuxa -lm ld: can't locate file for: -lcpuxa make[2]: *** [nxamsg] Error 1 make[1]: *** [subdirs] Error 2 make: *** [subdirs] Error 2 [/QUOTE]The -lcpuxa is because the first parts of the compile failed.
If all this works then cd ..; tar zcvf xalib-mac.tgz xalib-0.48. This will create a tar file, then email that to me and I'll include it in a new release.
|
|
Top
|
|
|
|
#13032 - 06/23/05 08:24 AM
Re: Misterhouse
|
George Alder
newbie
Registered: 11/29/04
Posts: 1
Loc: Oklahoma
|
Does anyone know if Misterhouse will receive/respond to ASCII messages form the Ocelot Serial Port?
|
|
Top
|
|
|
|
#13033 - 06/24/05 05:25 PM
Re: Misterhouse
|
Neil Cherry
junior
Registered: 01/17/03
Posts: 37
|
Not to my knowledge, but it should be possible to extend the module to support it. I'm not the author of the module.
|
|
Top
|
|
|
|
#13034 - 12/23/05 11:11 PM
Re: Misterhouse
|
David Norwood
newbie
Registered: 11/20/03
Posts: 11
Loc: Thousand Oaks, CA
|
Sorry for late response. Yes, misterhouse can react to ASCII strings sent by the Ocelot using a Serial_Item. See mh/code/examples/ocelot_raingauge.pl in the misterhouse distribution for an example.
David
|
|
Top
|
|
|
|
Moderator: Dan Smith, Monte G, ADI Tech Support, Guy Lavoie
|
1 registered
(Jerry200)
and 3 anonymous users online.
|
|
2466 Members
19 Forums
3458 Topics
20550 Posts
Max Online: 58 @ 12/05/07 03:33 PM
|
|
|