Package Exports
- homebridge-hatch-baby-rest
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (homebridge-hatch-baby-rest) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
ring-client-api
This homebridge plugin allows you to add the Hatch Baby Rest bluetooth night light to HomeKit. It is intended to work with the original Hatch Baby Rest, and I cannot confirm whether or not it works with the newer Hatch Baby Rest Plus (which has wifi support and my not use bluetooth). This plugin will only work if run on a device with Bluetooth LE (version 4+). This includes the Raspberry Pi 3 b+ and newer, as well as most modern laptops. Please check your device specifications to ensure it supports Bluetooth LE before trying to run the plugin or opening GitHub issues.
Installation
npm i -g homebridge-hatch-baby-rest
Configuration
First, open the Hatch Baby Rest app on your smartphone or tablet. In the device settings for your light, find the MAC address. In the example below, it is 12:34:56:78:90:AB
.
{
"accessories": [
{
"accessory": "HatchBabyRest",
"name": "Kid's Night Light",
"macAddress": "12:34:56:78:90:AB",
"volume": 29,
"audioTrack": 14,
"color": { "r": 254, "g": 254, "b": 254, "a": 83 }
}
]
}
Configuration Options
Option | Required | Details |
---|---|---|
accessory | true |
Must be HatchBabyRest to link it to this plugin |
name | true |
The name you want assigned to this light in HomeKit |
macAddress | true |
The MAC address for the light, found in your Hatch Baby Rest app. This is used to discover the light via bluetooth |
volume | false |
The volume level to set the speaker of the light to when it is turned on. Must be between 0 and 100. If set to 0 or left blank, the speaker will not play music when turned on via HomeKit |
audioTrack | false |
The audio track number to play when the light is turned on with HomeKit. See the table below for the different track names/numbers |
color | false |
The color and intensity to turn on the light. See below for more details |
Please note, the light will do nothing if you don't supply either color
or volume
and audioTrack
.
Audio Configuration
To play music when the light is turned on via HomeKit, you must supply both volume
and audioTrack
. These are the audio tracks an their associated number which you can use in the configuration:
Track Name | Track Number |
---|---|
None | 0 |
Stream | 2 |
PinkNoise | 3 |
Dryer | 4 |
Ocean | 5 |
Wind | 6 |
Rain | 7 |
Bird | 9 |
Crickets | 10 |
Brahms | 11 |
Twinkle | 13 |
RockABye | 14 |
Color Configuration
color
must be in the format { "r": 254, "g": 254, "b": 254, "a": 83 }
. r
(red), g
(green) and b
(blue) can be combined to create different colors. If you supply 254
for r
, g
and b
, the light will go into multi-color mode and rotate through all of the colors. a
determines how bright the light should be (values from 0
- 255
). Here are some example color configurations:
Example | Description |
---|---|
{ "r": 254, "g": 254, "b": 254, "a": 64 } |
multi-color, 1/4 brightness |
{ "r": 255, "g": 255, "b": 255, "a": 255 } |
white, full brightness |
{ "r": 255, "g": 0, "b": 0, "a": 128 } |
red, 1/2 brightness |
{ "r": 0, "g": 255, "b": 0, "a": 128 } |
green, 1/2 brightness |
{ "r": 0, "g": 0, "b": 255, "a": 128 } |
blue, 1/2 brightness |
{ "r": 255, "g": 0, "b": 255, "a": 128 } |
purple, 1/2 brightness |