PineTime Sleep Tracking
#1
I have been reading about the PineTime and it seems like a neat product. However, one feature that would really make me want to grab one is some kind of sleep tracking. From what I’ve seen, this feature is not implemented on the PineTime. 
What is the likelihood that this feature might be implemented down the road? What other features would need to be in place before this could be possible?
  Reply
#2
We've only got movement (accelerometer) and heart rate, neither of which are particularly good indicators of sleep state from what I've read. The heart rate is rather inaccurate at the moment too, by more than enough to throw off sleep state estimates. Some argue that wrist mounted optical sensors are never accurate enough for this use, so on its own a PineTime on its own may never be capable of accurate sleep tracking, and getting misled by inaccurate tracking is worse than no tracking at all.

You could potentially use it in combination with bluetooth sensors such as a chest strap for heart rate and/or breathing rate and depth measurement. I don't think we have any code yet for connecting to such devices, recording or analysis of their results. However it's done, someone will need to be able to record data with both the sensors and a separate known reliable system in order to verify accuracy. I wouldn't like to guess if or when this might happen - we could be lucky and have a sleep researcher wanting an inexpensive and portable device they can customise.
  Reply
#3
I too am interested in buying a pinetime for this very purpose. I don't mind a low accuracy as I'm mostly interested in how much I move during my sleep.

Also the ability to wake up with a wrist vibration is a plus for me as it would avoid waking up my wife...

I would be willing to support financially any coder interested in helping out as I know only python and shell currently. Btw which language is actually required to code an app on the pinetime?

Is anyone else interested?
  Reply
#4
InfiniTime and Wasp-OS have an alarm app already, so waking with a wrist vibration should be viable.
https://wasp-os.readthedocs.io/en/latest...pplication

InfiniTime is written in C/C++ while Wasp-OS uses MicroPython, and has an emulated watch you can use for testing on your desktop.
https://wasp-os.readthedocs.io/en/latest/appguide.html

If you want to record how much you move the step counter code would be a good working example for capturing and using accelerometer data.
  Reply
#5
Thanks, that's really helpful
  Reply
#6
(12-13-2021, 06:24 AM)wibble Wrote: We've only got movement (accelerometer) and heart rate, neither of which are particularly good indicators of sleep state from what I've read. The heart rate is rather inaccurate at the moment too, by more than enough to throw off sleep state estimates. Some argue that wrist mount...

I was surprised by your statement and looked up a few studies. I find them pretty encouraging. For example this one : https://academic.oup.com/sleep/article/4...login=true
Quoting the conclusion :

Data from multisensor consumer wearables are strongly correlated with reference devices at the epoch level and can be used to develop epoch-by-epoch models of sleep–wake rivaling existing research devices.


So I'm still quite hopeful about this and will try and give it a go in the next few months.
  Reply
#7
That does look more promising - perhaps what I read was outdated, or looking at the measures individually. Good luck - it would be good if you can get it to work well.
  Reply
#8
Thanks! I created a very preliminary repo where I will develop the thing. Just linking it here in case anyone has a similar project Smile. Don't duplicate the effort!

https://github.com/thiswillbeyourgithub/...me_wasp-os
  Reply
#9
Hi there, a new user of PineTime here.

As a many years user of Sleep As Android app, I can say that an accelerometer and a good algorithm is more than enough to have a sleep tracking.

As for optical pulse sensing, the same applies too, for example, my wife got some Garmin watch that do great in matter.

Problem with Sleep As Android is that there are hundreds of phone models, each with different hardware/software combination. So, I have poor performance with a Redmi phone.

That way, single platform with a certain hardware (i.e. PineTime) is ideal for finetuning.

Sleep As Android is capable to integrate various smart watches to get data, so I'm intended to do a little research here. It is always nice to have smartphone power to do math, while some wearable is providing data.
  Reply
#10
(02-05-2022, 04:44 AM)ksotar Wrote: Problem with Sleep As Android is that there are hundreds of phone models, each with different hardware/software combination. So, I have poor performance with a Redmi phone.

That way, single platform with a certain hardware (i.e. PineTime) is ideal for finetuning.

Sleep As Android is capable to integrate various smart watches to get data, so I'm intended to do a little research here. It is always nice to have smartphone power to do math, while some wearable is providing data.

So Sleep As Android recently got Infinitime >1.9.0 support, and it works great.

However, it doesn't seem to do heart rate tracking. Anybody here know how to enable that?
  Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pinetime Black Screen philipallmon 0 145 11-11-2024, 12:47 AM
Last Post: philipallmon
  PineTime charging issues - connecting pins black gsoundsgood 2 465 09-15-2024, 02:59 PM
Last Post: gsoundsgood
  How do I clear all personal data from the pinetime smartwatch? taltamir 7 621 08-23-2024, 04:44 AM
Last Post: 67man
  [SOLVED] Gadgetbridge not pairing with pinetime zoof 3 5,129 06-25-2024, 12:21 AM
Last Post: Amen
  PineTime at FOSDEM jmlich 5 1,865 02-07-2024, 11:48 PM
Last Post: tllim
  PineTime turns off when removed from cradle tynstar 0 579 01-31-2024, 11:57 AM
Last Post: tynstar
  PineTime and Amazfish on Ubuntu Touch jmlich 1 1,233 10-14-2023, 04:12 PM
Last Post: tllim
  PineTime is dead!! Markdanni123 12 16,299 09-18-2023, 10:17 PM
Last Post: ccchan234
  PineTime Dead out of box? henkery 1 1,653 03-12-2023, 04:34 PM
Last Post: henkery
  Pinetime almost dead... only shows Infinitime logo. lightweight 8 8,819 02-11-2023, 09:30 AM
Last Post: alexmitroff

Forum Jump:


Users browsing this thread: 1 Guest(s)