I have bought the tweet-a-watt product using xBee module.
And I followed all the instruction posted on the web.
But at the end of sequences, I met a problem.
The problem is that I can not open the serial com port with the python script.
For example, I can not execute the python codes from http://www.ladyada.net/make/tweetawatt/parser.html as shown below.
--------------------------------------
from xbee import xbee
import serial
SERIALPORT = "COM6" # the com/serial port the XBee is connected to
BAUDRATE = 9600 # the baud rate we talk to the xbee
# open up the FTDI serial port to get data transmitted to xbee
ser = serial.Serial(SERIALPORT, BAUDRATE)
ser.open()
while True:
# grab one packet from the xbee, or timeout
packet = xbee.find_packet(ser)
if packet:
xb = xbee(packet)
print xb
-------------------------------------------------------
Whenever running this codes, I can see the following error messages.
------------------------------------------------------------------
Traceback (most recent call last):
File "C:/wattcher/test2.py", line 9, in <module>
ser.open()
File "C:\Python25\Lib\site-packages\serial\serialwin32.py", line 53, in open
raise SerialException("could not open port %s: %s" % (self.portstr, ctypes.WinError()))
SerialException: could not open port COM6: [Error 5] access denied.
---------------------------------------------------------------------
I've downloaded and installed the following programmes.
python-2.5.4.msi
pyserial-2.5-rc1.win32.exe
pywin32-214.win32-py2.5.exe
simplejson-2.0.9
And I assigned the correct COM port #.
Also I did not operate any other application program which can access the same COM port while operating the python codes.
What can I do for solving this problem?

