xbee:xml
This is an old revision of the document!
trying to find xbee info for usn xml-rpc to retrieve data from the connectport x4
http://docs.python.org/library/simplexmlrpcserver.html
here is thread from '08 someone was trying to set it up: http://forums.digi.com/support/forum/viewthread_thread,877#3322
Re: zb_tcp_serial.py Control Port Got it working! Here's the python code that runs on my PC to obtain the Zigbee address to TCP port mapping (I used the list method as the discover output was identical - I presume that if I've discovered new devices through the Web interface, they'll show up in list): --------- import xmlrpclib # # Define the Host and port HOST='192.168.1.54' PORT='27000' # Create the XML-RPC object instance server = xmlrpclib.ServerProxy('http://' + HOST + ':' + PORT + '/RPC2') # # Obtain the result of the list method list=server.list() # # Loop through the results and list relevant fields for x in list: # NOTE: Everything from here to the end is indented to part of the "for" list # Get the 64-bit address and clean it up ExtendedAddress=x['addr_extended'] ExtendedAddress=ExtendedAddress.replace('[','') ExtendedAddress=ExtendedAddress.replace(']','') ExtendedAddress=ExtendedAddress.replace('!','') # Get the Node ID NodeID=x['label'] # Get the TCP Port TCPPort=x['port_number'] print '64-bit Address: ' + ExtendedAddress + ', NodeID: ' + NodeID + ', TCP Port: ' + str(TCPPort) ----------- Here's the output from a program run from the command prompt: ----------- D:\FILES\z. System\Power Monitor\Digi ConnectPort X2>xmlrpc 64-bit Address: 00:13:a2:00:40:0a:3e:ff, NodeID: E2, TCP Port: 27001 D:\FILES\z. System\Power Monitor\Digi ConnectPort X2>
xbee/xml.1274653218.txt.gz · Last modified: 2010/05/23 17:20 by rfile