XBee API
The digidevice.xbee Python module offers the get_device function for accessing the internal XBee device of your IX15.
def get_device(timeout: int = -1) -> XBeeDevice
This function returns a representation of the XBee device in the IX15. This object class is defined in the XBee Python Library, and depends on the protocol your XBee is using:
- XBeeDevice: generic XBee device.
- ZigBeeDevice: ZigBee protocol-specific XBee device.
- DigiMeshDevice: DigiMesh protocol-specific XBee device.
- Raw802Device: 802.15.4 protocol-specific XBee device.
Example: Get local XBee instance
from digidevice import xbee
local_xbee = xbee.get_device()
Once the local XBee of the IX15 is retrieved, you can work with it using the XBee Python Library API that is integrated into the gateway firmware:
- Retrieve and discover the XBee nodes in your network.
- Send and receive data to or from other XBee devices in the network.
- Read and set the IO lines of remote nodes.
- And so forth
Note See the Digi XBee Python Library project online for additional documentation.