Wrapper around the (undocumented) SNOO Smart Bassinet API
This is an API client to the SNOO Smart Bassinet. The SNOO is a bassinet that will rock your baby to sleep, and responds to the baby by trying to sooth it with different rocking motions and sounds when it detects crying.
Currently, it supports getting the current session data from SNOO, and historic data. It does not allow you to control the SNOO (the control API is provided by PubNub and is different from the read-only data API hosted by happiestbaby.com)
A word of caution
The SNOO API is undocumented. Using it might or might not violate Happiest Baby, Inc Terms of Service. Use at your own risk.
pip install snoo
Command line usage
To get the status of your snoo, simply run
$ snoo status Soothing 26m
The first time you run it, it will prompt for your username and password. These will be stored in either
~/.config/snoo/snoo.config, depending on your system. The output of the
snoo command is the status (
Soothing), and the duration of the current session.
To export data of each individual session, use
$ snoo sessions --start DATE --end DATE
DATE follows the format
2019-12-03. By default,
--end correspond to yesterday and today, respectively.
The result is a CSV formatted list of sessions in the snoo, eg.
start_time,end_time,duration,asleep,soothing 2019-12-03T12:35:11,2019-12-03T13:59:04,5033,4218,815 2019-12-03T15:28:13,2019-12-03T15:28:41,28,17,11 ...
soothing are durations given in seconds.
Alternatively, you can get aggregated information about each day using
Again, all durations are given in seconds. How
nightSleep are defined is set in your Snoo app.
from snoo import Client client = Client() # Find out where your config is stored print(client.config_path) # Get data from your current session current_session = client.get_current_session() # Print the status of the current session. print(client.status())
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size snoo-0.3.1-py3-none-any.whl (6.3 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size snoo-0.3.1.tar.gz (6.1 kB)||File type Source||Python version None||Upload date||Hashes View|