Hi elcano;
I see where you are going with this, but I think your methodology may be more complicated and result in accuracies you would not be happy with.
First you will have to have a method to drive/amplify that analog output to overcome the pull-up resistor of the Elk.
Second, if you use an expansion module, the information will only be updated every thirty seconds unless you cross the upper or lower threshold limits (initially set for EOL use) which is something like 8 volts for upper and 3 for lower (don't quote me on those numbers). This may or may not be a problem for you in your situation though.
The programming (I posted) is not the complicated part about this (just select a com port number and a HomeSeer device code. You do have to manually create the virtual device in HS). If you don't use HomeSeer you can use other apps such as VB.
Also, if you are going to go analog, how are you going to register the "actual" real time reading of the sensor with the Elk? As far as I know there is no way to actually "read" that number unless you extract it out of the serial port using something like electron's (my.elk) script (there is that “serial port†coming into play again!)
Also, MarkL's script (HomeSeer Elk plugin) (for those that may want to know this) has analog conversion capability! You just have to enter the values for m and b for a slope intercept formula via entries in an ini file and you will have a converted value in a HomeSeer device.
The Elk does not provide any native way of looking at the real time analog value.
The closest you could come to doing this with the elk is write rules for when the value crossed a certain threshold and act on that.
As far as CPU usage, you will not have much if you just have the unit on for a short (few seconds) that you want to take a reading for (tank level apps). For motion sensing (on all the time) you would burden the CPU, but hopefully Gerry can take care of that for us with his PIC solution/integration methods described above.
I have experimented a lot with the Elk's analog capabilities and found them very limited. I even went as far as removing a pull-up resistor, but then found the 30 second update problem with their expanders.
Don't get me wrong as I'm NOT bashing the Elk. It will suffice for most HA enthusiast’s capabilities. I (as well as my idol) am hoping that at least they offer a jumper setting for the capability of removing that surface mounted pull up resistor in the future though and also incorporate some way of "seeing" the real time data in analog format. A method of providing some math to the voltage level would also be nice, though not necessary as most people have auxiliary software to interface with their system (i.e. HomeSeer and CQC).
I'm not trying to discourage you either (you are the adventurous type that I like around here!!
) Just trying to give you some insights from my recent experiences.
Regards,
BSR