pebble-health-export
pebble-health-export copied to clipboard
Cannot set the wake-up time
First of all, I really appreciate this very useful app!
I'm having a problem with setting the wake-up time. When I tried to set it at 1:00 and submit, reopen the setting of the app, then the wake-up time is now shown as 0:00. It seems I can set it properly for two-digit hours (10:00-23:00) but not for one-digit hours (0:00-9:00). It might have something to do with my timezone (+0900). Could you please check?
Also would it be possible to set multiple wake-up times per day? Thank you!
At least it seems I can reproduce the problem in my timezone: when I set a wake-up time with one-digit hour, the configuration is accepted and correctly sent to the watch, but when I come back to the configuration page I get an empty space after "Wake-up time" instead of the configured hour. Is that what you're experiencing too?
In that case, the watchapp should still wake-up at the given time, you would just have to re-configure manually the wake-up time each time to enter the configuration page. That's not very good, but it seems like a decent work-around until the bug is fixed.
It's a bit difficult to tackle this kind of bugs, because it is likely a problem in the javascript embedded in the configuration page. This javascript works fine on my firefox, but obviously something goes wrong in the browser embedded in the pebble phone app, which doesn't have a javascript console or developer tools. I'll still investigate it, but I have no idea how long it will take.
As far as the multiple wake-up times, it wouldn't be difficult to code, but I can't imagine for now is how to make it work with the configuration page. The time selection widget seems static, so either I hardcode 2 or 3 or 4 possible wake-up time, or someone with much more javascript skills than me needs to come with a solution to make a variable number of time widgets in there.
But if you don't mind, what would be the problem solved by having multiple wake-up times? There might be other, more accessible solutions. I went for a single wake-up time every day because "activity" field seems to be reset be pebble every day at midnight local time, so you would have to export once per day to not miss out. But what do you gain with multiple exports per day?
...Is that what you're experiencing too?
Yes, that's exactly what I'm experiencing. But the work-around you suggested is good enough for now and, although not shown, one-digit wake-up time does seem to be working properly. Thank you.
what do you gain with multiple exports per day?
Well, I wrote a web app script in Google Apps Script (GAS) to receive the exported data and expand them into a Google spreadsheet, and it is very nice that the wake-up time function can add the new data everyday automatically. I'm now hoping to periodically process the raw data into something more comprehensive and send notifications to my smartphone etc. by using GAS's time-driven trigger function. So, for example, if two exports per day can be implemented, it might be possible to send a notification for sleep in the morning and another notification for steps at night. Of course, one export per day (one combined notification of sleep and steps per day) is not a problem at all.
I went for a single wake-up time every day because "activity" field seems to be reset be pebble every day at midnight local time
Indeed, the activity field does seem to be reset at midnight. When I initially set the wake-up time at 1:00, I noticed that the activity data are transferred only from 0:00-1:00 and all the rest (1:00-23:59) are lost (at the next transfer at 1:00 on the following day). So I assume I have to set the wake-up time at 23:59 to minimize the activity data loss. Do I understand correctly?
That's a very interesting question, that will require some more experimentation to reach a complete answer.
When I made this project, the activity mask only had light sleep and deep sleep. Then it seemed to have a kind of "sleep session": it keeps the activity from the moment I go to bed to the moment I wake up. There are several cases where the watch though I was sleeping at 20:00 (because I left it unmoving in a dark locker during a sport session) and kept that info for the whole next day. However, if I happen to not be sleeping at midnight, then the previous "sleep session" is forgotten.
I put mine at 21:00, because it's late enough for me to be home most of the time (I seldom have data during the work day), but early enough that I'm not sleeping yet (because I don't know what would happen to the activity mask at 23:30 if I'm in bed since 22:30 for example).
So that was easy then, I could choose any time in the awake part of the day.
Now they added the walk and run activities (I don't think the "open workout" ever made it to the actual firmware), and I have no idea what rules they follow. The fact that I'm not very active in the evenings doesn't help knowing whether some data is lost of not, but sampling a few of the "walks" reported by the watch after 21:00 are all on days when I started the export later than the walk.
I see, thank you. I will also do some experimentation with the timing of the wake-up time. Anyway, multiple wake-ups per day might be helpful to deal with this "forgetting" issue.