-
Notifications
You must be signed in to change notification settings - Fork 3
Add - Sleep Modes #159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: api-v2
Are you sure you want to change the base?
Add - Sleep Modes #159
Conversation
proto/wippersnapper/sleep.proto
Outdated
| enum WakeupSource { | ||
| W_UNSPECIFIED = 0; /** Wakeup source is unspecified. */ | ||
| W_TIMER = 1; /** Wakeup source is a timer. */ | ||
| W_PIN = 2; /** Wakeup source is a pin. */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wonder if we have 3=w_pins, 4=timer+pin, 5=timer+pins. Maybe pin could just use the pins mask version instead so we only need an extra one for 3=timer+pin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a MVP. We can always extend this enum in the future to support EXT1 (multiple pin) wakeup source.
This pull request adds support for ESP32x sleep functionality to the WipperSnapper API, enabling the option of having low-power WipperSnapper nodes.
Sleep "Mode" Overview

message Entercontains configuration for a node to configure itself for entering a sleep mode.mode- Required sleep mode, supports the primary ESP32x sleep modes - Light Sleep and Deep SleepWakeupSourceandTimerConfig'sduration. However, I think we'll always want to expose this field (even if we hide it or put it under an "advanced options" dropdown).WakeupSource- There are several wakeup sources in the sleep modes. However, we are only supporting timer-based wake (RTC/timer) and pin-based wake (external GPIO)configcontainsmodeconfigurationmessage Goodnightcontains a message to indicate the device is going to sleep. It is published to Adafruit IO. It may eventually be required to expanded to contain a failure state (if the device fails to go into deep sleep).message Wake- Sent when a device wakes up from sleep.EspWakeCause)WakeCauseis aoneof.