how to configure how long a device will sleeep?

Hi,
In looking at the yml parameters for the aio adapter
I don’t see one which tells the unit how long to remain asleep. How is this determined?

Thanks,
Mark

I am still figuring this out :slight_smile: Note that doing test & development of a bunch of sensors sleeping for 1 hour is a pain, so do most of your work with them sleeping a few minutes.

Below is a cut from a YML putting a Xbee AIO Adapter to sleep, waking it once per 5 minute (per 300,000 msec). When it wakes, it sends a sample and waits 5 seconds for any XBee response, then goes back to sleep. Since Power=On, it powers up the pin 6 12vdc out, and this will be held high for the entire wake period, so any predelay, plus the awake time. So in this situation, I burn 0+5 seconds of sensor power always.

Literally Dia may set:

  • IR to 0xFFFF (it is a dummy setting at this point)

  • SP = 0x30 & SN = 0x271 (since SP * SN is the setting, this pair is a factored combo & may vary)

  • WH is the sample_predelay, which defaults to 1000 msec (0 here since my sensor is pure resistance without warm-up)

    • name: itank01
      driver: devices.xbee.xbee_devices.xbee_aio:XBeeAIO
      settings:
      xbee_device_manager: xbee_device_manager
      extended_address: “00:13:a2:00:40:52:94:D4!”
      sleep: True
      sample_rate_ms: 300000
      awake_time_ms: 5000
      sample_predelay: 0
      power: “On”
      channel1_mode: “TenV”
      channel2_mode: “TenV”
      channel3_mode: “TenV”
      channel4_mode: “TenV”

Message was edited by: lynnl

Hi Lynn,
Hey that worked great! What’s the max on the sample rate? (Where do you find out things like that?).

Thanks for the help,
Mark

It will be big - sticks in my head is like 40 days (or was it only 4 days?) I’ll look for the answer. SP * SN is a 32-bit number, and I know once per day (per-24 hours) won’t be a problem & it’s hard for me to imagine a system where you won’t want to at least talk once per day to know the sensor’s still alive.

Just remember the ZB Xbee isn’t tuned for precision time-keeping, so 10 nodes sleeping 24-hours might all wake up within 10 minutes of each - for the FIRST day, then drift a few minutes per day thereafter.

The DigiMesh Xbee have more accurate clocks, but eat more battery power while sleeping to accomplish this.

Will this timing method work for wall routers as well?

Putting the wall-router to sleep “breaks” the function as a router, making it a “wall-end-device”.

Is your true goal to control the iDigi upstream rate?