-
Notifications
You must be signed in to change notification settings - Fork 88
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
Wake reasons not showing in the logs correctly #71
Comments
Is your device powered by USB? If it is then it won't report the wake reason correctly. Originally Enviro boards were never intended to be powered via USB when in use - they were meant for battery power where the board fully shuts down between readings. It seems quite a few people want to run their boards on permanent power via the USB port though so we will add support for that use case in the future. |
Nope, most of the time it's running on a High Capacity Lithium Ion Battery Pack |
Thanks for the feedback, this definitely seems to be a bug - we'll get on it! |
@MrDrem My best guess is that our code reads the button state too late after wake-up so defaults to reporting unknown. There was a similar issue with the Enviro Weather and detecting rain ticks. I will investigate further. |
@MrDrem Just to let you (and others) know. I'm working on fixes for many of the enviro issues over in |
There is a new release that fixes this issue: https://github.com/pimoroni/enviro/releases/tag/v0.0.9 |
Looking at lines 211-232 in enviro/init.py, I think that the log file should show the reasons why the system has woken from sleep.
Looking at my log file I can see that most of these are returning 'unknown'.
I know that most of the logs should show 'rtc_alarm' as the cause, but that those at 2022-09-05 18:16:37 and 2022-09-05 19:06:13 should be 'button' as I know those were caused by me hitting the 'poke' button.
I also suspect that at 2022-09-05 18:01:23, 2022-09-05 18:01:26, 2022-09-05 18:01:31, 2022-09-05 18:18:58 & 2022-09-05 18:32:50 should have a wake reason line with 'rain_sensor' against them.
The text was updated successfully, but these errors were encountered: