Hey Frank, I don't think I'll be using the analog output as the voltage would be to low and I'm thinking not enough resolution for the distances I would see.
You can easily calculate the expected voltage output though from the documentation (based on your specific measured distance range).
Because the sensor is spitting out data (when the RX input is high) at a fast rate it will cause a five percent increase in CPU usage with HomeSeer (with my 1.2 GHZ AMD with 512 MB ram). You could incorporate a signal from one of the serial output lines and hold it high say every five seconds or so, but as per smee's advice you would have to do something to accommodate the voltage level differences between the serial port's 12 volt output and the sonic board's five volt input limitation.
Actually come to think of it, why couldn't one just use a 555 timer circuit sort of like I did for my car monitor
project, and have that hold the RX input line high for a second say for every ten seconds or so (depending on how often you need a reading). Let's see what smee thinks of that idea
. You could also use an Elk 960 Timer relay if you had one around.
You would just have to play around with the two external resistor values and the 10 microfarad cap value. There are plenty of 555 tutorials around that shows how to do this.
If possible it would be nice to only have this on say for half a second and pulse the sensor every five or so seconds with that pulse. This would significantly reduce the CPU usage for HomeSeer. Since the sensor is spitting out RS232 data automatically whenever the RX line is high, you wouldn't have to worry about sending anything via the RS232 port to initiate a reading.
The only thing you would
have to worry about is the accuracy of the first reading though as the sensor self calibrated. But the last value during that "on" pulse would be the "best" value taken during an "on" cycle.
Anyways if you are using it as a driveway monitor you would need "gross" numbers anyways.
One nice thing though is now that the script is posted at the HS board Rupp referenced above, this makes it pretty much a plug and play item for HomeSeer!
My thanks go out to Michael (The Great) McSharry (my new nickname for him!) for simplifying my original code (hehe, my code worked, just took waaay to many lines compared to Michael's method) I used the first suggested method he posted (and not the "one-line" suggestion).
I don't have a lot of free time this week (family in town, son graduating Friday) but maybe later that following week I can play around with this some more.