Hello,
I am a beginner who will work with zigbee.
I search for program examples to manage nodes / I-O
where can I find these
This is our repository for code examples, demo apps, and the living Python Programmer’s Guide for Digi products:
http://www.digi.com/wiki/developer/index.php/Python_Wiki
Our main python offering, the iDigi Dia (Device Integration Application), can be found here:
http://www.idigi.com/resources.jsp
Hi
You mean to say all the python examples can run on all DIGI products…?? I was particularly interested in GPS example for a XBEE product based on Zigbee… is it possible…??
These examples can run on Digi products that have a python interpreter, like the ConnectPort X series of gateways. They can’t run directly on an XBee module if that is what you are wondering.
I was particularly interested in GPS example for a XBEE product based on Zigbee… is it possible…??
Assuming you have an RS-232 or other serial GPS device, then it is easy to ‘tunnel’ the serial data it produces over XBee. You’d configure the GPS-attached XBee to send with the DH/DL setting to your gateway (or other collection point), then the GPS device just sends data non-stop.
The down-side of this is that GPS is quite a chatty protocol with many messages being sent per second (up to 5 or 6). So it will limit the size of your XBee network. If your GPS was a TTL-level module, then a small PIC/Micro which filters the traffic would help. For example, if the GPS module is NOT moving, there’s no reason to update the host every second. Plus some of the vendor-propriteary GPS messages will never be used, so wouldn’t need to be forwarded.
If instead you mean use the GPS feature of the Digi to forward the Lat/Long info over XBee, that could be done easily with a Python script.
You’d configure the GPS-attached XBee to send with the DH/DL setting to your gateway (or other collection point), then the GPS device just sends data non-stop.
Could this be fixed when loading the API firmware to the XBee? Would it be too much to ask if could you elaborate as to how to initiate this change using a Python script on the connect port?
Something like:
foo = zigbee.ddo_set_param(addr, id, val)
foo(addr, DH)
?
via: Digi Python Wiki Archive
Other tutorials seem to suggest:
sample = zigbee.ddo_get_param(DESTINATION, ‘1S’)
print sample
But that gives me: Exception: ddo_get_param: error fetching DDO parameter … which seems to suggest the device is unresponsive
Assuming REM_ADDR is the XBee MAC in question, then it would be something like:
zigbee.ddo_set_param(REM_ADDR, ‘DH’, 0x0013a200)
zigbee.ddo_set_param(REM_ADDR, ‘DL’, 0x4066a305)
zigbee.ddo_set_param(REM_ADDR, ‘AC’)
zigbee.ddo_set_param(REM_ADDR, ‘WR’)
The AC and WR apply, and then save the changes.
The ‘1S’ command is only available on one specific Digi adapter, so is generally of no value to the average user.