jcallaghan / home-assistant-config

My Home Assistant configuration & documentation.
https://www.jcallaghan.com/
MIT License
175 stars 8 forks source link

Wearable thermometer #86

Open jcallaghan opened 4 years ago

jcallaghan commented 4 years ago

Objective

Our body temperature gives us a good indication of how well we are. It is also a sign of stress and many other things and I'm curious about the data. With a shortage of thermometers likely due to CONVID19 I'm curious if I can build a wearable thermometer to allow me to get some sample data. Other wearable devices like my Apple Watch provide me with data such as exercise (or lack of in my case) and heart rate but not my body temperature. If I get something that provides reliable data I thought it would be useful to keep to monitor when if I fall ill someday.

Adults. Among adults, the average body temperature ranges from 36.1°C to 37.2°C (97°F - 99°F).

Examples

image

CCOSTAN commented 4 years ago

I love this idea. My SleepIQ bed gives me heart Rate and Breathing rate data points and I can see elevations in heart rate days before actually getting symptomatic sick.

jcallaghan commented 4 years ago

Prototype

@CCOSTAN, I didn't want to turn into a cyborg and don't plan to use this anywhere other than my home so thought I'd keep it simple. I've ordered a stretch fabric armband which I plan to add an Aqara temperature sensor too. I'll tear the sensor down outside of its case to allow closer contact to the body surface. I should have a working prototype tomorrow. Looking forward to seeing the results. With regards to heart rate, I have been considering seeing if my Wahoo heart rate monitor publishes the heart rate over BLE. If it does this would be neat for the maker scene and a great companion to the body temperature sensor.

jcallaghan commented 4 years ago

Research

jcallaghan commented 4 years ago

Aqara testing

Not sure it makes the grade. The thing I found with the Aqara temperature sensor is that it isn't easy to have it in contact with the skin without using a lot of pressure due to how it is placed on the PCB board.

image

image

image

image

So now I need to go back to the drawing board and possibly even up the cyborg state a little. But even this simple test has got me thinking about IoT in healthcare and how beneficial making data available realtime is. Particularly now with COVID19 in minimising cross infection and improving medical professional productivity by having data readily available.

image

jcallaghan commented 4 years ago

Bluetooth temperature band

After a poor start, I was keen to review a dedicated Bluetooth Wearable Baby Thermometer band.

image

sudo bluetoothctl
scan on
[NEW] Device C0:26:DE:00:00:D4 TAIDOC TD1035
scan off
pair C0:26:DE:00:00:D4
connect C0:26:DE:00:00:D4
menu gatt
list-attributes 
Primary Service
    /org/bluez/hci0/dev_C0_26_DE_00_00_D4/service0019
    00001523-1212-efde-1523-785feabcd123
    Vendor specific
Characteristic
    /org/bluez/hci0/dev_C0_26_DE_00_00_D4/service0019/char001a
    00001524-1212-efde-1523-785feabcd123
    Vendor specific
Descriptor
    /org/bluez/hci0/dev_C0_26_DE_00_00_D4/service0019/char001a/desc001c
    00002902-0000-1000-8000-00805f9b34fb
    Client Characteristic Configuration
Primary Service
    /org/bluez/hci0/dev_C0_26_DE_00_00_D4/service0014
    0000180a-0000-1000-8000-00805f9b34fb
    Device Information
Characteristic
    /org/bluez/hci0/dev_C0_26_DE_00_00_D4/service0014/char0017
    00002a26-0000-1000-8000-00805f9b34fb
    Firmware Revision String
Characteristic
    /org/bluez/hci0/dev_C0_26_DE_00_00_D4/service0014/char0015
    00002a24-0000-1000-8000-00805f9b34fb
    Model Number String
Primary Service
    /org/bluez/hci0/dev_C0_26_DE_00_00_D4/service000c
    00001809-0000-1000-8000-00805f9b34fb
    Health Thermometer
Characteristic
    /org/bluez/hci0/dev_C0_26_DE_00_00_D4/service000c/char000d
    00002a1c-0000-1000-8000-00805f9b34fb
    Temperature Measurement
Descriptor
    /org/bluez/hci0/dev_C0_26_DE_00_00_D4/service000c/char000d/desc000f
    00002902-0000-1000-8000-00805f9b34fb
    Client Characteristic Configuration
Primary Service
    /org/bluez/hci0/dev_C0_26_DE_00_00_D4/service0008
    00001801-0000-1000-8000-00805f9b34fb
    Generic Attribute Profile
Characteristic
    /org/bluez/hci0/dev_C0_26_DE_00_00_D4/service0008/char0009
    00002a05-0000-1000-8000-00805f9b34fb
    Service Changed

Research

jcallaghan commented 4 years ago

Wahoo Kickr Ant+ bluetooth heart rate sensor

Out of curiosity, I wanted to see if I could access the data from my heart rate sensor that I use on my bike. With the help of a USB ANT stick

Device information

dmesg | tail
lsusb
ls /dev/ttyUSB*

Bus 001 Device 004: ID 0fcf:1008 Dynastream Innovations, Inc. ANTUSB2 Stick

image

Openant repo

git clone https://github.com/Tigge/openant.git
cd openant
sudo python setup.py install
cd examples
python heart_rate_monitor.py

After modifying the above python script to publish the BPM to an MQTT topic I was able to access the data in Grafana.

image

Research