SuperMemoAssistant
SuperMemoAssistant copied to clipboard
Method for Automatic SleepChart Data Input
Sleep chart is a bit of a pain because I have to manually input data into it. It would be nice if (maybe using IFTT) there were some way to have data automatically inputted into sleep chart.
This feature requires additional reverse engineering of SuperMemo to unlock the required functionalities
Hmm, I was thinking it could be done by directly editing the sleepchart file. I'm not sure if it would be worth it if it requires too much work, I'm not sure how many people would actually use it aside from me.
I've never used sleep chart before. If there is a file, it might be easier.
Supermemo Stores it in a binary file sleep.tim Here is what i managed to figure out
Have to do with months
|
/---------------\
| |
00 18 C2 45 55 18 C2 45 FF FF 00 00
\----------/ \----------/ \----------/
| | |
start timestamp end timestamp some padding bytes, they never changed over a recording period of a 6 months
if you can do a quick analysis i'll bundle it up into a plugin/service. I tried a lot of stuff but failed tbh.
http://supermemopedia.com/wiki/Format_for_importing_sleep_data_into_SuperMemo_Sleep_Chart
Here's Woz's explanation of the format for CSV sleep data imports. May differ with the format of the .TIM file though.
0000 0000 0001 1000 1100 0010 0100 0101
0 0 1 8 C C 4 5
Assuming:
Hr (5 bits) Min(6 bits)
0 - 24 0 - 60
00000 000000 110001100001001000101
00 18 C2 45 55 18 C2 45 FF FF 00 00 | 00:00 - 01:00 1 Jan 2017 6211 days
00 80 CD 45 55 80 CD 45 FF FF 00 00 | 00:00 - 01:00 1 Jan 2018 6576 days
00 E8 D8 45 55 E8 D8 45 FF FF 00 00 | 00:00 - 01:00 1 Jan 2019 6941 days
00 50 E4 45 55 50 E4 45 FF FF 00 00 | 00:00 - 01:00 1 Jan 2020 7306 days
using this converter nothing makes sense honestly
@AM429 If you're going down this path, you could try https://www.sweetscape.com/010editor/
You can define structures and apply them to files. Very handy for reverse engineering. That's what I used for SM files. I've attached examples below.

Can confirm the above is correct - I was able to read my sleep chart data from the sleep.tim file. I created a project here to start working on enabling writing to the file using data from sleep trackers.