https://github.com/hesto2/owlet-client
Unofficial node library for interacting with the owlet baby monitor
https://github.com/hesto2/owlet-client
iot-device
Last synced: about 1 year ago
JSON representation
Unofficial node library for interacting with the owlet baby monitor
- Host: GitHub
- URL: https://github.com/hesto2/owlet-client
- Owner: hesto2
- Created: 2020-05-29T00:01:52.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-04T21:00:31.000Z (over 3 years ago)
- Last Synced: 2025-03-22T07:45:59.835Z (about 1 year ago)
- Topics: iot-device
- Language: TypeScript
- Homepage:
- Size: 1.5 MB
- Stars: 6
- Watchers: 1
- Forks: 1
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Owlet Client
Unofficial package for interacting with owlet's smart sock api. Note that this
only works in the US. If you want to use this and are in a different country,
create an issue and I will implement support for other regions.
## Installation
`yarn add owlet-api`
## Example Usage
In order for the authentication to work, the package expects two environment
variables to be present: `OWLET_EMAIL` and `OWLET_PASSWORD`. The token returned
from the authentication calls is valid for 24 hours.
```
const token = await login();
const devices = await getDevices(token);
const sock = await getDeviceAsSmartSock(devices[0].device.dsn, token);
console.log(sock);
/* Prints:
{
baseStationOn: 0,
batteryLevel: 94,
chargeStatus: 0, // Is 1 if fully charged, 2 if charging
heartRate: 124,
movement: 0,
oxygenLevel: 98
}
*/
await setBaseStationOn(true, sock, token);
```