Electron Detect Wakeup from Pin Vs. Timer

I’m having trouble finding a good way to detect whether or not the Electron has been woken up from sleep mode from the wakeup pin or the sleep cycle has been timed out. I have tried sleeping on an interval and checking whether or not the electron is awake between those intervals. I would like a more robust solution just in case the electron is woken up exactly on the interval. I have also tried attaching an interrupt to the same pin that wakes up the Electron to no avail. The Electron seems to not respond to the interrupt on startup. I have also tried looking at whether the signal pin is high on wakeup, but this also is not working. The electron wakes up but checking the pin will report a low value after the first wakeup from the pin.

That’s a question asked and answered by me (and others) so often that I’m just asking you to search please.