Door contacts with a weeder digital

View: New views
9 Messages — Rating Filter:   Alert me  

Door contacts with a weeder digital

by James Ledbetter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have a weeder digital IO board and have connected up 5 door contacts.  I have searched and followed every example I can find, but most of them relate to using the weeder to control relays.  The Wiki goes into detail about using the weeder for outputs, but unfortunately just briefly mentions inputs.  I have the following in my mh.private.ini

weeder_port=/dev/ttyUSB7
weeder_baudrate=9600

I have tried a couple of different serial ports.  I have a w800, Insteon_PLM and a 1-wire interface working fine on my 8 port USB->Serial unit.

this is a snippet from my mh.log

Found managed X10_W800.pm module
MH will now require X10_W800.pm and call &X10_W800::startup
 - creating W800 port on /dev/ttyUSB1
Found managed serial port=Insteon_PLM
MH will now require Insteon_PLM.pm and call Insteon_PLM::serial_startup(Insteon_PLM)
07/10/08 01:47:51 AM [Insteon_PLM] serial:/dev/ttyUSB0:19200
 - creating Insteon PLM port on /dev/ttyUSB0
 - creating weeder port on /dev/ttyUSB7
 - process id 8243 written to /opt/misterhouse/data/mh.pid
 - external command file (xcmd_file): ./../house_cmd.txt
 - HTML file     : ./../web/ia5/index.shtml
Done with setup

It looks to create the weeder port just fine. 

I am not sure what else to do from here?  The only time I saw any response in my log file was an A!, which indicates board reset or powerup. 
I have the 5 inputs on A-E, with a common to GND.  I am using a 9vDC power adapter to power the weeder with the jumper on EXT. 

The documentation seems to support that the default for the port is input, which should work for my magnetic door contacts.  I did try the following bit of perl, which was adapted from the weeder_io.pl file I found in MH, but I am not sure this is correct.  I also dont know if I need anything in my items.mht file.


# digital items
$front_door_a       = new  Serial_Item('AAH', OPENED, 'weeder');        #A
$front_door_a      -> add             ('AAL', CLOSED, 'weeder');
$front_door_a      -> add             ('ASA', 'init', 'weeder');
$front_door_a      -> add             ('ARA', 'read', 'weeder');

$door_b             = new  Serial_Item('ABH', OPENED, 'weeder');        #B
$door_b            -> add             ('ABL', CLOSED, 'weeder');
$door_b            -> add             ('ASB', 'init', 'weeder');
$door_b            -> add             ('ARB', 'read', 'weeder');

$door_c             = new  Serial_Item('ACH', OPENED, 'weeder');        #C
$door_c            -> add             ('ACL', CLOSED, 'weeder');
$door_c            -> add             ('ASC', 'init', 'weeder');
$door_c            -> add             ('ARC', 'read', 'weeder');

$door_d             = new  Serial_Item('ADH', OPENED, 'weeder');        #D
$door_d            -> add             ('ADL', CLOSED, 'weeder');
$door_d            -> add             ('ASD', 'init', 'weeder');
$door_d            -> add             ('ARD', 'read', 'weeder');

$door_e             = new  Serial_Item('AEH', OPENED, 'weeder');        #E
$door_e            -> add             ('AEL', CLOSED, 'weeder');
$door_e            -> add             ('ASE', 'init', 'weeder');
$door_e            -> add             ('ARE', 'read', 'weeder');


Any help would be greatly appreciated. 

James




-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Door contacts with a weeder digital

by Jeff-71 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

James,
  Do you have any pullups or other electronics in the circuit?  Or do you have
the only the contacts hooked up to the weeders?

James Ledbetter wrote:

> I have a weeder digital IO board and have connected up 5 door contacts.  
> I have searched and followed every example I can find, but most of them
> relate to using the weeder to control relays.  The Wiki goes into detail
> about using the weeder for outputs, but unfortunately just briefly
> mentions inputs.  I have the following in my mh.private.ini
>
> weeder_port=/dev/ttyUSB7
> weeder_baudrate=9600
>
> I have tried a couple of different serial ports.  I have a w800,
> Insteon_PLM and a 1-wire interface working fine on my 8 port USB->Serial
> unit.
>
> this is a snippet from my mh.log
>
> Found managed X10_W800.pm module
> MH will now require X10_W800.pm and call &X10_W800::startup
>  - creating W800 port on /dev/ttyUSB1
> Found managed serial port=Insteon_PLM
> MH will now require Insteon_PLM.pm and call
> Insteon_PLM::serial_startup(Insteon_PLM)
> 07/10/08 01:47:51 AM [Insteon_PLM] serial:/dev/ttyUSB0:19200
>  - creating Insteon PLM port on /dev/ttyUSB0
>  - creating weeder port on /dev/ttyUSB7
>  - process id 8243 written to /opt/misterhouse/data/mh.pid
>  - external command file (xcmd_file): ./../house_cmd.txt
>  - HTML file     : ./../web/ia5/index.shtml
> Done with setup
>
> It looks to create the weeder port just fine.
>
> I am not sure what else to do from here?  The only time I saw any
> response in my log file was an A!, which indicates board reset or powerup.
> I have the 5 inputs on A-E, with a common to GND.  I am using a 9vDC
> power adapter to power the weeder with the jumper on EXT.
>
> The documentation seems to support that the default for the port is
> input, which should work for my magnetic door contacts.  I did try the
> following bit of perl, which was adapted from the weeder_io.pl file I
> found in MH, but I am not sure this is correct.  I also dont know if I
> need anything in my items.mht file.
>
>
> # digital items
> $front_door_a       = new  Serial_Item('AAH', OPENED, 'weeder');        #A
> $front_door_a      -> add             ('AAL', CLOSED, 'weeder');
> $front_door_a      -> add             ('ASA', 'init', 'weeder');
> $front_door_a      -> add             ('ARA', 'read', 'weeder');
>
> $door_b             = new  Serial_Item('ABH', OPENED, 'weeder');        #B
> $door_b            -> add             ('ABL', CLOSED, 'weeder');
> $door_b            -> add             ('ASB', 'init', 'weeder');
> $door_b            -> add             ('ARB', 'read', 'weeder');
>
> $door_c             = new  Serial_Item('ACH', OPENED, 'weeder');        #C
> $door_c            -> add             ('ACL', CLOSED, 'weeder');
> $door_c            -> add             ('ASC', 'init', 'weeder');
> $door_c            -> add             ('ARC', 'read', 'weeder');
>
> $door_d             = new  Serial_Item('ADH', OPENED, 'weeder');        #D
> $door_d            -> add             ('ADL', CLOSED, 'weeder');
> $door_d            -> add             ('ASD', 'init', 'weeder');
> $door_d            -> add             ('ARD', 'read', 'weeder');
>
> $door_e             = new  Serial_Item('AEH', OPENED, 'weeder');        #E
> $door_e            -> add             ('AEL', CLOSED, 'weeder');
> $door_e            -> add             ('ASE', 'init', 'weeder');
> $door_e            -> add             ('ARE', 'read', 'weeder');
>
>
> Any help would be greatly appreciated.
>
> James
>
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
>
>
> ------------------------------------------------------------------------
>
> ________________________________________________________
> To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365
>

--
Jeff Pagel, MIEEE  jeff AT pagel D0T net  http://www.pagel.net
(715) 359-8033        Cell:(715) 370-3472      or    370-disco
--------------------------------------------------------------

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Door contacts with a weeder digital

by James Ledbetter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No other electronics, just the contacts. Am I doing it wrong?

On Sun, Jul 13, 2008 at 8:44 PM, Jeff <jeff@...> wrote:
James,
 Do you have any pullups or other electronics in the circuit?  Or do you have
the only the contacts hooked up to the weeders?

James Ledbetter wrote:
> I have a weeder digital IO board and have connected up 5 door contacts.
> I have searched and followed every example I can find, but most of them
> relate to using the weeder to control relays.  The Wiki goes into detail
> about using the weeder for outputs, but unfortunately just briefly
> mentions inputs.  I have the following in my mh.private.ini
>
> weeder_port=/dev/ttyUSB7
> weeder_baudrate=9600
>
> I have tried a couple of different serial ports.  I have a w800,
> Insteon_PLM and a 1-wire interface working fine on my 8 port USB->Serial
> unit.
>
> this is a snippet from my mh.log
>
> Found managed X10_W800.pm module
> MH will now require X10_W800.pm and call &X10_W800::startup
>  - creating W800 port on /dev/ttyUSB1
> Found managed serial port=Insteon_PLM
> MH will now require Insteon_PLM.pm and call
> Insteon_PLM::serial_startup(Insteon_PLM)
> 07/10/08 01:47:51 AM [Insteon_PLM] serial:/dev/ttyUSB0:19200
>  - creating Insteon PLM port on /dev/ttyUSB0
>  - creating weeder port on /dev/ttyUSB7
>  - process id 8243 written to /opt/misterhouse/data/mh.pid
>  - external command file (xcmd_file): ./../house_cmd.txt
>  - HTML file     : ./../web/ia5/index.shtml
> Done with setup
>
> It looks to create the weeder port just fine.
>
> I am not sure what else to do from here?  The only time I saw any
> response in my log file was an A!, which indicates board reset or powerup.
> I have the 5 inputs on A-E, with a common to GND.  I am using a 9vDC
> power adapter to power the weeder with the jumper on EXT.
>
> The documentation seems to support that the default for the port is
> input, which should work for my magnetic door contacts.  I did try the
> following bit of perl, which was adapted from the weeder_io.pl file I
> found in MH, but I am not sure this is correct.  I also dont know if I
> need anything in my items.mht file.
>
>
> # digital items
> $front_door_a       = new  Serial_Item('AAH', OPENED, 'weeder');        #A
> $front_door_a      -> add             ('AAL', CLOSED, 'weeder');
> $front_door_a      -> add             ('ASA', 'init', 'weeder');
> $front_door_a      -> add             ('ARA', 'read', 'weeder');
>
> $door_b             = new  Serial_Item('ABH', OPENED, 'weeder');        #B
> $door_b            -> add             ('ABL', CLOSED, 'weeder');
> $door_b            -> add             ('ASB', 'init', 'weeder');
> $door_b            -> add             ('ARB', 'read', 'weeder');
>
> $door_c             = new  Serial_Item('ACH', OPENED, 'weeder');        #C
> $door_c            -> add             ('ACL', CLOSED, 'weeder');
> $door_c            -> add             ('ASC', 'init', 'weeder');
> $door_c            -> add             ('ARC', 'read', 'weeder');
>
> $door_d             = new  Serial_Item('ADH', OPENED, 'weeder');        #D
> $door_d            -> add             ('ADL', CLOSED, 'weeder');
> $door_d            -> add             ('ASD', 'init', 'weeder');
> $door_d            -> add             ('ARD', 'read', 'weeder');
>
> $door_e             = new  Serial_Item('AEH', OPENED, 'weeder');        #E
> $door_e            -> add             ('AEL', CLOSED, 'weeder');
> $door_e            -> add             ('ASE', 'init', 'weeder');
> $door_e            -> add             ('ARE', 'read', 'weeder');
>
>
> Any help would be greatly appreciated.
>
> James
>
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
>
>
> ------------------------------------------------------------------------
>
> ________________________________________________________
> To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365
>

--
Jeff Pagel, MIEEE  jeff AT pagel D0T net  http://www.pagel.net
(715) 359-8033        Cell:(715) 370-3472      or    370-disco
--------------------------------------------------------------

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365



-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Door contacts with a weeder digital

by Joel Davidson :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sounds right to me.  I'm using the same definition code as you have
below, plus the following:

if ($Startup or $Reload) {
   #repeat for each sensor defined:
   set $front_door_a 'init;
   }

$fd_state = new Generic_Item;
$fd_state = state_changed $front_door_a;

if (defined $fd_state) {
   print "$Time_Date: Front door is $fd_state\n";
   }

There may be an easier way to do it, but it seems to work ok.
Hope it helps some.

Joel
--
Joel Davidson
Austin, TX

On Mon, 14 Jul 2008, it would appear that James Ledbetter wrote:

> No other electronics, just the contacts. Am I doing it wrong?
>
> On Sun, Jul 13, 2008 at 8:44 PM, Jeff <jeff@...> wrote:
>
>> James,
>>  Do you have any pullups or other electronics in the circuit?  Or do you
>> have
>> the only the contacts hooked up to the weeders?
>>
>> James Ledbetter wrote:
>>> I have a weeder digital IO board and have connected up 5 door contacts.
>>> I have searched and followed every example I can find, but most of them
>>> relate to using the weeder to control relays.  The Wiki goes into detail
>>> about using the weeder for outputs, but unfortunately just briefly
>>> mentions inputs.  I have the following in my mh.private.ini
>>>
>>> weeder_port=/dev/ttyUSB7
>>> weeder_baudrate=9600
>>>
>>> I have tried a couple of different serial ports.  I have a w800,
>>> Insteon_PLM and a 1-wire interface working fine on my 8 port USB->Serial
>>> unit.
>>>
>>> this is a snippet from my mh.log
>>>
>>> Found managed X10_W800.pm module
>>> MH will now require X10_W800.pm and call &X10_W800::startup
>>>  - creating W800 port on /dev/ttyUSB1
>>> Found managed serial port=Insteon_PLM
>>> MH will now require Insteon_PLM.pm and call
>>> Insteon_PLM::serial_startup(Insteon_PLM)
>>> 07/10/08 01:47:51 AM [Insteon_PLM] serial:/dev/ttyUSB0:19200
>>>  - creating Insteon PLM port on /dev/ttyUSB0
>>>  - creating weeder port on /dev/ttyUSB7
>>>  - process id 8243 written to /opt/misterhouse/data/mh.pid
>>>  - external command file (xcmd_file): ./../house_cmd.txt
>>>  - HTML file     : ./../web/ia5/index.shtml
>>> Done with setup
>>>
>>> It looks to create the weeder port just fine.
>>>
>>> I am not sure what else to do from here?  The only time I saw any
>>> response in my log file was an A!, which indicates board reset or
>> powerup.
>>> I have the 5 inputs on A-E, with a common to GND.  I am using a 9vDC
>>> power adapter to power the weeder with the jumper on EXT.
>>>
>>> The documentation seems to support that the default for the port is
>>> input, which should work for my magnetic door contacts.  I did try the
>>> following bit of perl, which was adapted from the weeder_io.pl file I
>>> found in MH, but I am not sure this is correct.  I also dont know if I
>>> need anything in my items.mht file.
>>>
>>>
>>> # digital items
>>> $front_door_a       = new  Serial_Item('AAH', OPENED, 'weeder');
>>  #A
>>> $front_door_a      -> add             ('AAL', CLOSED, 'weeder');
>>> $front_door_a      -> add             ('ASA', 'init', 'weeder');
>>> $front_door_a      -> add             ('ARA', 'read', 'weeder');
>>>
>>> $door_b             = new  Serial_Item('ABH', OPENED, 'weeder');
>>  #B
>>> $door_b            -> add             ('ABL', CLOSED, 'weeder');
>>> $door_b            -> add             ('ASB', 'init', 'weeder');
>>> $door_b            -> add             ('ARB', 'read', 'weeder');
>>>
>>> $door_c             = new  Serial_Item('ACH', OPENED, 'weeder');
>>  #C
>>> $door_c            -> add             ('ACL', CLOSED, 'weeder');
>>> $door_c            -> add             ('ASC', 'init', 'weeder');
>>> $door_c            -> add             ('ARC', 'read', 'weeder');
>>>
>>> $door_d             = new  Serial_Item('ADH', OPENED, 'weeder');
>>  #D
>>> $door_d            -> add             ('ADL', CLOSED, 'weeder');
>>> $door_d            -> add             ('ASD', 'init', 'weeder');
>>> $door_d            -> add             ('ARD', 'read', 'weeder');
>>>
>>> $door_e             = new  Serial_Item('AEH', OPENED, 'weeder');
>>  #E
>>> $door_e            -> add             ('AEL', CLOSED, 'weeder');
>>> $door_e            -> add             ('ASE', 'init', 'weeder');
>>> $door_e            -> add             ('ARE', 'read', 'weeder');
>>>
>>>
>>> Any help would be greatly appreciated.
>>>
>>> James
>>>

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Door contacts with a weeder digital

by Michael Easton :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi James,
Does it error after you initialize the board? For instance:
if ($Reload or $Startup) {
    for my $resetboard2 (
                $door_a,
                $door_b,
                $door_c,
                $door_d,
                $door_e,) {
        set $resetboard2 'init';
     }
}

Michael

--- On Mon, 7/14/08, James Ledbetter <ledhost@...> wrote:

> From: James Ledbetter <ledhost@...>
> Subject: Re: [mh] Door contacts with a weeder digital
> To: "The main list for the MisterHouse home automation program" <misterhouse-users@...>
> Date: Monday, July 14, 2008, 5:34 AM
> No other electronics, just the contacts. Am I doing it
> wrong?
>
> On Sun, Jul 13, 2008 at 8:44 PM, Jeff
> <jeff@...> wrote:
>
> > James,
> >  Do you have any pullups or other electronics in the
> circuit?  Or do you
> > have
> > the only the contacts hooked up to the weeders?
> >
> > James Ledbetter wrote:
> > > I have a weeder digital IO board and have
> connected up 5 door contacts.
> > > I have searched and followed every example I can
> find, but most of them
> > > relate to using the weeder to control relays.
> The Wiki goes into detail
> > > about using the weeder for outputs, but
> unfortunately just briefly
> > > mentions inputs.  I have the following in my
> mh.private.ini
> > >
> > > weeder_port=/dev/ttyUSB7
> > > weeder_baudrate=9600
> > >
> > > I have tried a couple of different serial ports.
> I have a w800,
> > > Insteon_PLM and a 1-wire interface working fine
> on my 8 port USB->Serial
> > > unit.
> > >
> > > this is a snippet from my mh.log
> > >
> > > Found managed X10_W800.pm module
> > > MH will now require X10_W800.pm and call
> &X10_W800::startup
> > >  - creating W800 port on /dev/ttyUSB1
> > > Found managed serial port=Insteon_PLM
> > > MH will now require Insteon_PLM.pm and call
> > > Insteon_PLM::serial_startup(Insteon_PLM)
> > > 07/10/08 01:47:51 AM [Insteon_PLM]
> serial:/dev/ttyUSB0:19200
> > >  - creating Insteon PLM port on /dev/ttyUSB0
> > >  - creating weeder port on /dev/ttyUSB7
> > >  - process id 8243 written to
> /opt/misterhouse/data/mh.pid
> > >  - external command file (xcmd_file):
> ./../house_cmd.txt
> > >  - HTML file     : ./../web/ia5/index.shtml
> > > Done with setup
> > >
> > > It looks to create the weeder port just fine.
> > >
> > > I am not sure what else to do from here?  The
> only time I saw any
> > > response in my log file was an A!, which
> indicates board reset or
> > powerup.
> > > I have the 5 inputs on A-E, with a common to GND.
>  I am using a 9vDC
> > > power adapter to power the weeder with the jumper
> on EXT.
> > >
> > > The documentation seems to support that the
> default for the port is
> > > input, which should work for my magnetic door
> contacts.  I did try the
> > > following bit of perl, which was adapted from the
> weeder_io.pl file I
> > > found in MH, but I am not sure this is correct.
> I also dont know if I
> > > need anything in my items.mht file.
> > >
> > >
> > > # digital items
> > > $front_door_a       = new
> Serial_Item('AAH', OPENED, 'weeder');
> >  #A
> > > $front_door_a      -> add            
> ('AAL', CLOSED, 'weeder');
> > > $front_door_a      -> add            
> ('ASA', 'init', 'weeder');
> > > $front_door_a      -> add            
> ('ARA', 'read', 'weeder');
> > >
> > > $door_b             = new
> Serial_Item('ABH', OPENED, 'weeder');
> >  #B
> > > $door_b            -> add            
> ('ABL', CLOSED, 'weeder');
> > > $door_b            -> add            
> ('ASB', 'init', 'weeder');
> > > $door_b            -> add            
> ('ARB', 'read', 'weeder');
> > >
> > > $door_c             = new
> Serial_Item('ACH', OPENED, 'weeder');
> >  #C
> > > $door_c            -> add            
> ('ACL', CLOSED, 'weeder');
> > > $door_c            -> add            
> ('ASC', 'init', 'weeder');
> > > $door_c            -> add            
> ('ARC', 'read', 'weeder');
> > >
> > > $door_d             = new
> Serial_Item('ADH', OPENED, 'weeder');
> >  #D
> > > $door_d            -> add            
> ('ADL', CLOSED, 'weeder');
> > > $door_d            -> add            
> ('ASD', 'init', 'weeder');
> > > $door_d            -> add            
> ('ARD', 'read', 'weeder');
> > >
> > > $door_e             = new
> Serial_Item('AEH', OPENED, 'weeder');
> >  #E
> > > $door_e            -> add            
> ('AEL', CLOSED, 'weeder');
> > > $door_e            -> add            
> ('ASE', 'init', 'weeder');
> > > $door_e            -> add            
> ('ARE', 'read', 'weeder');
> > >
> > >
> > > Any help would be greatly appreciated.
> > >
> > > James
> > >
> > >
> > >
> > >
> > >
> ------------------------------------------------------------------------
> > >
> > >
> -------------------------------------------------------------------------
> > > Sponsored by: SourceForge.net Community Choice
> Awards: VOTE NOW!
> > > Studies have shown that voting for your favorite
> open source project,
> > > along with a healthy diet, reduces your potential
> for chronic lameness
> > > and boredom. Vote Now at
> http://www.sourceforge.net/community/cca08
> > >
> > >
> > >
> ------------------------------------------------------------------------
> > >
> > >
> ________________________________________________________
> > > To unsubscribe from this list, go to:
> > http://sourceforge.net/mail/?group_id=1365
> > >
> >
> > --
> > Jeff Pagel, MIEEE  jeff AT pagel D0T net
> http://www.pagel.net
> > (715) 359-8033        Cell:(715) 370-3472      or  
> 370-disco
> >
> --------------------------------------------------------------
> >
> >
> -------------------------------------------------------------------------
> > Sponsored by: SourceForge.net Community Choice Awards:
> VOTE NOW!
> > Studies have shown that voting for your favorite open
> source project,
> > along with a healthy diet, reduces your potential for
> chronic lameness
> > and boredom. Vote Now at
> http://www.sourceforge.net/community/cca08
> >
> ________________________________________________________
> > To unsubscribe from this list, go to:
> > http://sourceforge.net/mail/?group_id=1365
> >
> >-------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE
> NOW!
> Studies have shown that voting for your favorite open
> source project,
> along with a healthy diet, reduces your potential for
> chronic lameness
> and boredom. Vote Now at
> http://www.sourceforge.net/community/cca08________________________________________________________
> To unsubscribe from this list, go to:
> http://sourceforge.net/mail/?group_id=1365


     

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Door contacts with a weeder digital

by Bazyle :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I really must complete the input instructions on the wiki. You see the A! in the MH log because a it doesn't understand it as it has not been defined. That is good though as it shows you the serial link works.  Later you will be able to trap this for a warning of an unscheduled reset of the Weeder eg due to power failure. It will not display things that have been defined like your AAL and AAH.
One error in the Wiki is the last sentence. Having defined the init command eg ASA you do have to send it to the Weeder just once (after every power up that is) otherwise it is still defaulting to an output.
Then you will have to define some action. The switch transition will probably be coming into MH and being stored as the STATE of $Door but you have to specifically do something with MH to get a response.
eg If state_now $door eq 'closed' then speak "door closed". ( note that line isn't proper Perl syntax just indication)
Baz

James Ledbetter wrote:
I have a weeder digital IO board and have connected up 5 door contacts.  I
have searched and followed every example I can find, but most of them relate
to using the weeder to control relays.  The Wiki goes into detail about
using the weeder for outputs, but unfortunately just briefly mentions
inputs.  I have the following in my mh.private.ini

weeder_port=/dev/ttyUSB7
weeder_baudrate=9600

I have tried a couple of different serial ports.  I have a w800, Insteon_PLM
and a 1-wire interface working fine on my 8 port USB->Serial unit.

this is a snippet from my mh.log

Found managed X10_W800.pm module
MH will now require X10_W800.pm and call &X10_W800::startup
 - creating W800 port on /dev/ttyUSB1
Found managed serial port=Insteon_PLM
MH will now require Insteon_PLM.pm and call
Insteon_PLM::serial_startup(Insteon_PLM)
07/10/08 01:47:51 AM [Insteon_PLM] serial:/dev/ttyUSB0:19200
 - creating Insteon PLM port on /dev/ttyUSB0
 - creating weeder port on /dev/ttyUSB7
 - process id 8243 written to /opt/misterhouse/data/mh.pid
 - external command file (xcmd_file): ./../house_cmd.txt
 - HTML file     : ./../web/ia5/index.shtml
Done with setup

It looks to create the weeder port just fine.

I am not sure what else to do from here?  The only time I saw any response
in my log file was an A!, which indicates board reset or powerup.
I have the 5 inputs on A-E, with a common to GND.  I am using a 9vDC power
adapter to power the weeder with the jumper on EXT.

The documentation seems to support that the default for the port is input,
which should work for my magnetic door contacts.  I did try the following
bit of perl, which was adapted from the weeder_io.pl file I found in MH, but
I am not sure this is correct.  I also dont know if I need anything in my
items.mht file.


# digital items
$front_door_a       = new  Serial_Item('AAH', OPENED, 'weeder');        #A
$front_door_a      -> add             ('AAL', CLOSED, 'weeder');
$front_door_a      -> add             ('ASA', 'init', 'weeder');
$front_door_a      -> add             ('ARA', 'read', 'weeder');

$door_b             = new  Serial_Item('ABH', OPENED, 'weeder');        #B
$door_b            -> add             ('ABL', CLOSED, 'weeder');
$door_b            -> add             ('ASB', 'init', 'weeder');
$door_b            -> add             ('ARB', 'read', 'weeder');

$door_c             = new  Serial_Item('ACH', OPENED, 'weeder');        #C
$door_c            -> add             ('ACL', CLOSED, 'weeder');
$door_c            -> add             ('ASC', 'init', 'weeder');
$door_c            -> add             ('ARC', 'read', 'weeder');

$door_d             = new  Serial_Item('ADH', OPENED, 'weeder');        #D
$door_d            -> add             ('ADL', CLOSED, 'weeder');
$door_d            -> add             ('ASD', 'init', 'weeder');
$door_d            -> add             ('ARD', 'read', 'weeder');

$door_e             = new  Serial_Item('AEH', OPENED, 'weeder');        #E
$door_e            -> add             ('AEL', CLOSED, 'weeder');
$door_e            -> add             ('ASE', 'init', 'weeder');
$door_e            -> add             ('ARE', 'read', 'weeder');


Any help would be greatly appreciated.

James

-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365

Re: Door contacts with a weeder digital

by James Ledbetter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I will try this tonight.  I am not currently sending any initialization string, didnt know I needed to.
Bazyle, So the mh.log file wont show receiving the serial data?

James


On Mon, Jul 14, 2008 at 2:48 PM, Bazyle <baz.butcher@...> wrote:

I really must complete the input instructions on the wiki. You see the A! in
the MH log because a it doesn't understand it as it has not been defined.
That is good though as it shows you the serial link works.  Later you will
be able to trap this for a warning of an unscheduled reset of the Weeder eg
due to power failure. It will not display things that have been defined like
your AAL and AAH.
One error in the Wiki is the last sentence. Having defined the init command
eg ASA you do have to send it to the Weeder just once (after every power up
that is) otherwise it is still defaulting to an output.
Then you will have to define some action. The switch transition will
probably be coming into MH and being stored as the STATE of $Door but you
have to specifically do something with MH to get a response.
eg If state_now $door eq 'closed' then speak "door closed". ( note that line
isn't proper Perl syntax just indication)
Baz


James Ledbetter wrote:
>
> I have a weeder digital IO board and have connected up 5 door contacts.  I
> have searched and followed every example I can find, but most of them
> relate
> to using the weeder to control relays.  The Wiki goes into detail about
> using the weeder for outputs, but unfortunately just briefly mentions
> inputs.  I have the following in my mh.private.ini
>
> weeder_port=/dev/ttyUSB7
> weeder_baudrate=9600
>
> I have tried a couple of different serial ports.  I have a w800,
> Insteon_PLM
> and a 1-wire interface working fine on my 8 port USB->Serial unit.
>
> this is a snippet from my mh.log
>
> Found managed X10_W800.pm module
> MH will now require X10_W800.pm and call &X10_W800::startup
>  - creating W800 port on /dev/ttyUSB1
> Found managed serial port=Insteon_PLM
> MH will now require Insteon_PLM.pm and call
> Insteon_PLM::serial_startup(Insteon_PLM)
> 07/10/08 01:47:51 AM [Insteon_PLM] serial:/dev/ttyUSB0:19200
>  - creating Insteon PLM port on /dev/ttyUSB0
>  - creating weeder port on /dev/ttyUSB7
>  - process id 8243 written to /opt/misterhouse/data/mh.pid
>  - external command file (xcmd_file): ./../house_cmd.txt
>  - HTML file     : ./../web/ia5/index.shtml
> Done with setup
>
> It looks to create the weeder port just fine.
>
> I am not sure what else to do from here?  The only time I saw any response
> in my log file was an A!, which indicates board reset or powerup.
> I have the 5 inputs on A-E, with a common to GND.  I am using a 9vDC power
> adapter to power the weeder with the jumper on EXT.
>
> The documentation seems to support that the default for the port is input,
> which should work for my magnetic door contacts.  I did try the following
> bit of perl, which was adapted from the weeder_io.pl file I found in MH,
> but
> I am not sure this is correct.  I also dont know if I need anything in my
> items.mht file.
>
>
> # digital items
> $front_door_a       = new  Serial_Item('AAH', OPENED, 'weeder');        #A
> $front_door_a      -> add             ('AAL', CLOSED, 'weeder');
> $front_door_a      -> add             ('ASA', 'init', 'weeder');
> $front_door_a      -> add             ('ARA', 'read', 'weeder');
>
> $door_b             = new  Serial_Item('ABH', OPENED, 'weeder');        #B
> $door_b            -> add             ('ABL', CLOSED, 'weeder');
> $door_b            -> add             ('ASB', 'init', 'weeder');
> $door_b            -> add             ('ARB', 'read', 'weeder');
>
> $door_c             = new  Serial_Item('ACH', OPENED, 'weeder');        #C
> $door_c            -> add             ('ACL', CLOSED, 'weeder');
> $door_c            -> add             ('ASC', 'init', 'weeder');
> $door_c            -> add             ('ARC', 'read', 'weeder');
>
> $door_d             = new  Serial_Item('ADH', OPENED, 'weeder');        #D
> $door_d            -> add             ('ADL', CLOSED, 'weeder');
> $door_d            -> add             ('ASD', 'init', 'weeder');
> $door_d            -> add             ('ARD', 'read', 'weeder');
>
> $door_e             = new  Serial_Item('AEH', OPENED, 'weeder');        #E
> $door_e            -> add             ('AEL', CLOSED, 'weeder');
> $door_e            -> add             ('ASE', 'init', 'weeder');
> $door_e            -> add             ('ARE', 'read', 'weeder');
>
>
> Any help would be greatly appreciated.
>
> James
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> ________________________________________________________
> To unsubscribe from this list, go to:
> http://sourceforge.net/mail/?group_id=1365
>
>
>

--
View this message in context: http://www.nabble.com/Door-contacts-with-a-weeder-digital-tp18404996p18451684.html
Sent from the Misterhouse - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365



-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Door contacts with a weeder digital

by James Ledbetter :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Alright.  Well I ssh'd into my machine from work and made the changes.  I can read the state of the doors, though it appears one of my contacts is possibly shorted because it shows closed and via my camera I can see the door is definitely open.  Wife and kids are out at the moment, so I have to wait till later to open and close some doors. 
 
I want to thank you guys for the help.  I do have another related question.  Can you define those items in a .mht file?  These are the first items I have defined in code instead of in the .mht file and its a bit different for me.  Also, If I wanted to use a Door Item, so that these show as doors in the web interface.  How would I go about that?

Thanks again,
James

On Mon, Jul 14, 2008 at 4:05 PM, James Ledbetter <ledhost@...> wrote:
I will try this tonight.  I am not currently sending any initialization string, didnt know I needed to.
Bazyle, So the mh.log file wont show receiving the serial data?

James



On Mon, Jul 14, 2008 at 2:48 PM, Bazyle <baz.butcher@...> wrote:

I really must complete the input instructions on the wiki. You see the A! in
the MH log because a it doesn't understand it as it has not been defined.
That is good though as it shows you the serial link works.  Later you will
be able to trap this for a warning of an unscheduled reset of the Weeder eg
due to power failure. It will not display things that have been defined like
your AAL and AAH.
One error in the Wiki is the last sentence. Having defined the init command
eg ASA you do have to send it to the Weeder just once (after every power up
that is) otherwise it is still defaulting to an output.
Then you will have to define some action. The switch transition will
probably be coming into MH and being stored as the STATE of $Door but you
have to specifically do something with MH to get a response.
eg If state_now $door eq 'closed' then speak "door closed". ( note that line
isn't proper Perl syntax just indication)
Baz


James Ledbetter wrote:
>
> I have a weeder digital IO board and have connected up 5 door contacts.  I
> have searched and followed every example I can find, but most of them
> relate
> to using the weeder to control relays.  The Wiki goes into detail about
> using the weeder for outputs, but unfortunately just briefly mentions
> inputs.  I have the following in my mh.private.ini
>
> weeder_port=/dev/ttyUSB7
> weeder_baudrate=9600
>
> I have tried a couple of different serial ports.  I have a w800,
> Insteon_PLM
> and a 1-wire interface working fine on my 8 port USB->Serial unit.
>
> this is a snippet from my mh.log
>
> Found managed X10_W800.pm module
> MH will now require X10_W800.pm and call &X10_W800::startup
>  - creating W800 port on /dev/ttyUSB1
> Found managed serial port=Insteon_PLM
> MH will now require Insteon_PLM.pm and call
> Insteon_PLM::serial_startup(Insteon_PLM)
> 07/10/08 01:47:51 AM [Insteon_PLM] serial:/dev/ttyUSB0:19200
>  - creating Insteon PLM port on /dev/ttyUSB0
>  - creating weeder port on /dev/ttyUSB7
>  - process id 8243 written to /opt/misterhouse/data/mh.pid
>  - external command file (xcmd_file): ./../house_cmd.txt
>  - HTML file     : ./../web/ia5/index.shtml
> Done with setup
>
> It looks to create the weeder port just fine.
>
> I am not sure what else to do from here?  The only time I saw any response
> in my log file was an A!, which indicates board reset or powerup.
> I have the 5 inputs on A-E, with a common to GND.  I am using a 9vDC power
> adapter to power the weeder with the jumper on EXT.
>
> The documentation seems to support that the default for the port is input,
> which should work for my magnetic door contacts.  I did try the following
> bit of perl, which was adapted from the weeder_io.pl file I found in MH,
> but
> I am not sure this is correct.  I also dont know if I need anything in my
> items.mht file.
>
>
> # digital items
> $front_door_a       = new  Serial_Item('AAH', OPENED, 'weeder');        #A
> $front_door_a      -> add             ('AAL', CLOSED, 'weeder');
> $front_door_a      -> add             ('ASA', 'init', 'weeder');
> $front_door_a      -> add             ('ARA', 'read', 'weeder');
>
> $door_b             = new  Serial_Item('ABH', OPENED, 'weeder');        #B
> $door_b            -> add             ('ABL', CLOSED, 'weeder');
> $door_b            -> add             ('ASB', 'init', 'weeder');
> $door_b            -> add             ('ARB', 'read', 'weeder');
>
> $door_c             = new  Serial_Item('ACH', OPENED, 'weeder');        #C
> $door_c            -> add             ('ACL', CLOSED, 'weeder');
> $door_c            -> add             ('ASC', 'init', 'weeder');
> $door_c            -> add             ('ARC', 'read', 'weeder');
>
> $door_d             = new  Serial_Item('ADH', OPENED, 'weeder');        #D
> $door_d            -> add             ('ADL', CLOSED, 'weeder');
> $door_d            -> add             ('ASD', 'init', 'weeder');
> $door_d            -> add             ('ARD', 'read', 'weeder');
>
> $door_e             = new  Serial_Item('AEH', OPENED, 'weeder');        #E
> $door_e            -> add             ('AEL', CLOSED, 'weeder');
> $door_e            -> add             ('ASE', 'init', 'weeder');
> $door_e            -> add             ('ARE', 'read', 'weeder');
>
>
> Any help would be greatly appreciated.
>
> James
>
> -------------------------------------------------------------------------
> Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
> Studies have shown that voting for your favorite open source project,
> along with a healthy diet, reduces your potential for chronic lameness
> and boredom. Vote Now at http://www.sourceforge.net/community/cca08
> ________________________________________________________
> To unsubscribe from this list, go to:
> http://sourceforge.net/mail/?group_id=1365
>
>
>

--
View this message in context: http://www.nabble.com/Door-contacts-with-a-weeder-digital-tp18404996p18451684.html
Sent from the Misterhouse - User mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365




-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
________________________________________________________
To unsubscribe from this list, go to: http://sourceforge.net/mail/?group_id=1365


Re: Door contacts with a weeder digital

by Bazyle :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

James,
Have you tried an output. If you conect a LED to +5v via a 470R resistor you can also connect it to an input (not in addition to the switch) Then you can test the input and your associated software by simulating a door.
You can define things in the mht. See the serial item in the example test.mht but put the interface in the 'other' column as with the example CM17 entry. Start with an output as it's easier, but inputs work too, as do the initialisation items. There is a flag, I don't remember how, to stop the init items showing up where they shouldn't.

Note that the original weeder was an X10 interface so when you use it for the I/O some funnies happen - like lights wanting to have dimming levels. You don't have to call it weeder. You can use any name like "redbanana" so long as the entry in the ini file matches.

James Ledbetter wrote:
Can you define those items in a .mht file?  These are the first items I have
defined in code instead of in the .mht file and its a bit different for me.

James
LightInTheBox - Buy quality products at wholesale price