Home/Support/Support Forum/XBee3 (Zig) router(s) with "resident" script - alter params via coordinator?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

XBee3 (Zig) router(s) with "resident" script - alter params via coordinator?

0 votes
Hi,
I'm trying to get a mesh of XBee 3 Digimesh devices (flashed Zigbee as DM seems unready) to control end-devices without putting an MCU on the routers.

I need to command a router (n of 24) to accept a small set of parameters:
-> Timer1 var, 5 to 120sec, from trigger input sent by either the coord or another router
-> Timer2 var, 5 to 60sec, from end Timer 1 to (1 (of 3) digi pin input) || time-out
-> TBA (under dev) var

returning:
<- Digi pin number activated
<- TimeVal (Millis from Start Timer2 to pin activation)
<- SensorVal from Analog pin at time of activation

I have the mesh running perfectly, and I can trigger the individual Nodes on demand firing pins etc from a CommandLine interface/Teensy/Coordinator and read and ID pin-activations on individual Nodes

I am aware that these devices can be programmed to handle Py scripts, which would mean that rather than treating them like serial cables, I could dispense with the MCU on the Node end, but I am having serious difficulty finding any suitable application examples at my level of understanding.

I have coded the above in C for Arduino using NRF modules and a Teensy 3.6 as MCU on the control interface, but the NRFs proved flaky at best in a mesh config. So, now I'm trying to get the functionality ported to the XBee mesh system - which seems rock solid so far.

If you can offer any assistance to enable me to progress my project, an example of a triggerable timer event on a Node for example, and advise how to mount and save the code on the nodes, I would be well on my way.

btw, I purchased the XBee3-Digimesh 24 602-2205-ND and had to re-flash them as Zigbee devices as the micro-python firmware is not released as yet...
asked Aug 20, 2018 in 3rd Party Python and API development in other Languages by OldManNoob (-2 points)

Please log in or register to answer this question.

1 Answer

0 votes
All current python code examples that exist for the XBee 3 and XBee Cellular product can be found at https://xbplib.readthedocs.io/en/latest/index.html

Note that new examples are being added all the time so if you do not see what you are looking for. check again in a few weeks.
answered Aug 20, 2018 by mvut Veteran of the Digi Community (11,302 points)
I think you missed my point ;-)
There are no samples therein that refer to my query.
I can already get data from a remote device, send pin commands, read returns and do all of that.
What I need are examples of coding the Nodes to handle simple enough sequences based upon parameters sent by the Coordinator.

I have written a brief description of the kind of event handling I need (below), and I'm wondering if such a facility is available at all on the XBee3-24 device running the Digi XB3 Zigbee3.0 v1003 firmware?
If not, and without going Cellular, which devices are capable (as advertised) of handling such tasking?

I'm not asking anyone to code for me;  I'm asking if I can get the devices to act in this way, and if the answer is yes - where can I find an example of HOW to get them to play.


For illustration, my required actions:

The coordinator sends (for example): 20, 01, 35, 31524, 7 to Node 3.

Node 3 then, from that point:
  waits 20s (max) unless user 31524 arrives (ending the 1st timer)
  triggers D01 for 35s (max) - marks trigger time T
  if (user 31524 interacts with D02, D03 or D04 before 35s) {
     calculates a value based on that interaction(at T1)/the time T1-T
     resets D01
     triggers D05-D07 depending on which of D01-03  
  }else{
     resets D01 at timeout
  }
  Returns relevant values to Coordinator
  Informs User (via display): Goto Node 7
  waits for further input from Controller
...