From: Joel D. <jr...@io...> - 2005-04-27 19:02:40
|
Brent- I added a bunch of stuff to mh/lib/Omnistat.pm a while back to make if functional with HAI thermostats, so you may be able to use parts of that to get your code functional. As I recall, getting data back from the Omnistat was one of the more difficult problems. I'm not using the Omni controller though, just an RC-80 thermostat. Hope that helps some. Joel On Wed, 27 Apr 2005, it would appear that Brent DeShazer wrote: > Has anyone done any work on trying to communicate with any of the HAI Omni > series? I just picked up the PROMO12 kit (Omni II) from Smarthome on their > 15% off coupon sale to replace my old alarm system and am working on talking > to it from my MH linux box. I've searched the list archives and seen a few > other inquiries like this but not really any responses. > > I have developed some code to encode messages and calculate the required > message CRC's, I now just need to figure out how to send out the serial port > and receive responses back. I'm using the binary OmniLink protocol and have > the following defined in mh.private.ini: > > serial5_port=/dev/ttyQ1a2 # Port 2 of 16-port serial board > serial5_baudrate=9600 > serial5_handshake=none # Not sure if this is right? > serial5_datatype=raw # uses binary data > > and here's part of my test code that should just log in: > > # Category = OMNI > $OMNI_out = new Serial_Item(undef, undef, 'serial5'); > > $v_omni_login= new Voice_Cmd('Log in to Omni',''); > > if (my $data = said $OMNI_out) { > print_log "Serial data received ".unpack("H*",$data); > } > > if (said $v_omni_login) { > # > # code that builds $message snipped for brevity > # > set $OMNI_out $message; > print_log "Sent OMNI message ".unpack("H*",$message)."\n"; > } > >> From the print_log statement I can see the data is being properly created, > but I'm never getting a response back from "said"... > > Thanks, > > Brent |