Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Sleep integration with home automation

Hi,

Trying to figure out how I can verify my own state of sleep (Sleeping/Awake) to be able to automate setting the lights in our house. I want the lights to go off when I fall asleep 😉

I'm able to get sleep time data but it seems I have to open the app and sync to get any data - and that typically happens when I'm awake again. That's a little late to turn the lights off.

 

Need the status from my fitbit Blaze with about 15 minutes granularity.

I have the "All-Day sync" switch on.

 

Is there any point in investigating Subscriptions for this or would my problems getting too old data be laying somewhere else?

 

Best Answer
0 Votes
1 REPLY 1

Since the devices sync every 15-30 minutes, you could try building an integration between your home automation system and the Fitbit Web APIs.  When new sleep data is detected, the Subscriptions API will send your application notification containing the new data.  At that point, your application to retrieve the data, look for the sleep stages light, rem or deep, and turn the lights off.

 

 

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes