Configure wake up sources

The wake up sources refer to the different mechanisms and triggers used to wake up the device and put it in normal operating mode again when the device is in suspend mode. There are three available wake up sources:

To configure the different wake up sources, use the digidevice.config Python module as follows:

New API
from digidevice import config

# Load configuration.
cfg = config.load(writable=True)

# Configure the wake up sources:
cfg.set("system.power.wakeup_sources.xbee", True)
#cfg.set("system.power.wakeup_sources.xbee", False)
cfg.set("system.power.wakeup_sources.serial", True)
#cfg.set("system.power.wakeup_sources.serial", False)
cfg.set("system.power.wakeup_sources.rtc", True)
#cfg.set("system.power.wakeup_sources.rtc", False)

# When the RTC alarm wake up source is configured, you have to configure the date/time of the alarm using this format: [YYYY-MM-DD hh:mm:ss]
cfg.set("system.power.wakeup_sources.rtc_time", "YYYY-MM-DD hh:mm:ss")

# Apply and save configuration
cfg.commit()