Android Question Wear OS - sleep monitoring

msmerce

Member
Licensed User
Longtime User
I have been developing a SmartHome application for a while and am currently experimenting with a smartwatch (I am using a Huawei Watch 2) that runs Wear OS. In Google Fit or the Hauwei Health app, the information collected from sleep monitoring can be read out. This all works great. My goal is to detect in my own app whether the user is sleeping or awake - ideally I'm looking for an event like 'user_woke_up'.
Is it possible to read out the data directly from the SmartWatch, or would I need to take a diversion via a third-party provider, and how could this be implemented?

Thank you very much and best regards
Julius
 

msmerce

Member
Licensed User
Longtime User
Thank you very much for your reply. The heart rate doesn't say whether the user is sleeping or not. As far as I can see, not only the heart rate is used for sleep monitoring. Therefore, this would only be a compromise solution. Huawei TrueSleep can even detect which sleep phase you are in (for example deep sleep or REM sleep).
 
Upvote 0

msmerce

Member
Licensed User
Longtime User
Thanks, I will definitely try, although I imagine it will be hard, as I don't know the protocol between the already pre-installed app and the SmartWatch and would therefore have to find it out myself (via Wireshark, for example). Also, the phone would have to be connected to the watch all the time and the watch couldn't work on its own.
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
Thanks, I will definitely try, although I imagine it will be hard, as I don't know the protocol between the already pre-installed app and the SmartWatch and would therefore have to find it out myself (via Wireshark, for example). Also, the phone would have to be connected to the watch all the time and the watch couldn't work on its own.
if you can connect your Smartwatch to the App nRF connect then you should be able to use the example too
 
Last edited:
Upvote 0
Top