XBee Line Passing/Phototransistor

I’m working on a project that remotely determines if a light is on or off in a room through the use of a phototransistor. I’m using an XBee configured with line passing on DIO pin 0. Below is a rough sketch of the circuit I’m using:

http://i41.tinypic.com/2dbl007.jpg

In isolated cases, the line passing works fine (putting 5v on one end mirrors 5v on the host) and the phototransistor circuit works fine when measuring with a voltmeter (less than 0.2V with light off and greater than 4.7V with the light on when measuring VOUT) however I’m running into a problem when putting the pieces together. What appears to be happening is that the digital input pin on the XBee is reading 5V with my meter and causing problems when hooking it to the phototransistor (VOUT connection in my schematic). As far as I can tell, there’s nothing in the XBee documentation or firmware that affects the voltage on that pin.

Forgive my lack of circuits/XBee knowledge, but is there something I’m missing here? Is there a way to hook these modules together through some special configuration with the XBee or adding an additional component to the circuit?

Thank you advance for your time!

Firmware in the XBee needs to be configured to enable that pin as an analog input.

Also - I think you need some gain rather than the too simple circuit there and optical lenses, etc. Maybe an IR diode illuminating the line, pulsed ad 38KHz, and an IR detector as is used for RC5 remote controls with a 38KHz carrier. This detector will have a narrowband filter and gain and a digital output that goes true when the 38KHz carrier is detected, i.e., reflected into the detector.

Firmware in the XBee needs to be configured to enable that pin as an analog input.

The firmware is updated and configured to use that pin as a digital input; I’d like to avoid using it as an analog input due to the fact that I’m relying on the ‘change detect’ feature of the XBee to save battery power. When it comes down to it, I only need to detect if the light in a room is on or off, not the level of brightness in a room.

I appreciate the suggestion for the use of an IR diode for better accuracy - I hadn’t thought of that and will definitely consider implementing it.