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?
HeartRateMonitor class searches for peripherals with the heart rate service (0x180D). Once a peripheral device is found and connected then a notification is set for the heart rate measurement characteristic (0x2A37). The DataAvailable event is raised whenever the heart rate changes. The heart...
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).
I didn't mean this is the solution, I wanted to show the protocol of BLE transmission. Maybe they use a different service to show user's status. Google for protocol....
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.
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.