Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

homebridge-hatch-baby-rest

dgreif228MIT5.0.2

Homebridge plugin for Hatch Rest/Restore WiFi sound machines

homebridge-plugin, hatch, baby, rest, night, light, restore, sound, machine

readme

homebridge-hatch-baby-rest

verified-by-homebridge

This homebridge plugin allows you to add the Hatch Rest, Rest+ and Rest Mini, and Restore to HomeKit. For each device, you are able to control the following:

  • On / Off - Master switch for both light and sound **
  • Brightness and Color **
  • Audio Track - represented as a Fan, with different speed levels mapping to different audio tracks. For example, 0% is the "None" track, and 100% is the "Rock-a-Bye" track
  • Volume - not available in the Home app, but in some 3rd party HomeKit apps
  • Battery level and firmware version (Rest+ only)

** Rest Mini does not have a light, so only audio controls are available

The Hatch Restore, Restore 2, Rest 2nd Gen and Rest+ 2nd Gen support much more complicated routines which do not map well to HomeKit controls. Because of this complexity, they are exposed as a simple switch. Turning the switch on will initiate the first step in your Bedtime routine. Turning the switch off will turn the device off no matter which routine/step you are in.

If you have an older bluetooth model, please see the homebridge-hatch-rest-bluetooth plugin

Easy Setup

For the best experience, install and set up this plugin using homebridge-config-ui-x. This provides a user interface in which you can enter your account information without modifying your config file manually.

Manual Installation

npm i -g homebridge-hatch-baby-rest

Configuration

The Hatch sounds machines use WiFi to directly interact with Hatch's api. This allows you to access all of your Rest/Restore devices by simply providing your Hatch Baby email/password.

{
  "platforms": [
    {
      "platform": "HatchBabyRest",
      "email": "someone@gmail.com",
      "password": "secret password"
    }
  ]
}

Device Discovery

If you have a new device which is not yet supported, you will see a message like Unsupported Product Found: restoreV4. In this case, add "debug": true to your config and restart homebridge. This will log the device information and IoT state to the console. Please open an issue with this information and we will see if we can add support for your device.

changelog

Changelog

5.0.2

Patch Changes

5.0.1

Patch Changes

5.0.0

Major Changes

  • fdedff7 Thanks @dgreif! - Dropped support for Node 16. Please update to Node 18 or Node 20. This allows us to drop a dependency on got and use the native fetch from Node.js.

4.3.4

Patch Changes

4.3.3

Patch Changes

  • b8d93fa Thanks @dgreif! - Only fetch known products to avoid accidentally sending a bad device request. Should fix #125

4.3.2

Patch Changes

  • 71eb805 Thanks @dgreif! - Fetch both known and unknown device types in case Hatch does not give us a complete list of user devices. Might fix #123

  • 52cfcf1 Thanks @dgreif! - Mark grow as a known but unsupported device

4.3.1

Patch Changes

  • 072f68d Thanks @dgreif! - Fetch all products for the account, rather than just fetching known device types. This will allow us to log info for new unknown device types.

4.3.0

Minor Changes

  • 53769b7 Thanks @dgreif! - Add debug option which logs unknown product details

Patch Changes

  • d220117 Thanks @dgreif! - Prevent unsupported device logging for alexa devices

4.2.0

Minor Changes

  • f434fd7 Thanks @dgreif! - Add support for Restore 2 (restoreIot). Note, this is untested so please open an issue if you find the device does not work as expected.

4.1.0

Minor Changes

Patch Changes

  • c4f2596 Thanks @dgreif! - Fix bug where state was only partially retained after receiving remote changes

  • 171696f Thanks @dgreif! - Update dependencies

4.0.1

Patch Changes

  • 868d445 Thanks @dgreif! - Add user agent to API calls, which should resolve internal server errors in #107

4.0.0

Major Changes

  • b2a7958 Thanks @dgreif! - Require homebridge 1.5.1 or newer

  • b2a7958 Thanks @dgreif! - Require node 16 or 18

  • d70055f Thanks @dgreif! - Bluetooth versions of the Hatch Rest have been moved to the homebridge-hatch-rest-bluetooth plugin. Configuration for these lights will automatically be migrated the first time you run homebridge after updating to verison 4. You will need to manually install this new plugin for the lights to continue working, and automations related to these lights will need to be recreated. If you only have bluetooth lights, you can uninstall the homebridge-hatch-baby-rest plugin after migrating. These bluetooth lights require complicated dependencies and are fundementally different from the WiFi based lights, so I've decided to maintain them separately moving forward.

3.4.0 (2022-09-10)

Features

Bug Fixes

3.3.1 (2022-05-28)

Bug Fixes

3.3.0 (2022-05-08)

Features

Bug Fixes

3.3.0-beta.1 (2021-12-27)

3.3.0-beta.0 (2021-12-26)

Features

3.2.5 (2021-11-27)

Bug Fixes

3.2.4 (2021-09-18)

Bug Fixes

  • connect with aws iot before returning devices (2370896), closes #61
  • correct rounding for percentage conversion (85f8013)
  • refresh iot client every 8 hours (1f114a5), closes #59
  • typo in homebridge logs (3b0f0c1)
  • update dependencies (979cdc7)

3.2.3 (2021-08-15)

Bug Fixes

3.2.2 (2021-05-17)

3.2.1 (2021-05-17)

Bug Fixes

3.2.0 (2021-04-10)

Features

Bug Fixes

3.1.0 (2021-03-06)

Features

Bug Fixes

  • rest+: handle "no color" selection from hatch app (b1a8014), closes #45
  • update dependencies (9106508)

3.0.0 (2021-02-06)

⚠ BREAKING CHANGES

Features

  • unified platform config for rest and rest+ (8902516)
  • rest: separate power, light and sound accessories (f3ddba2)
  • rest+: separate power, light and sound accessories (55617e5)

Bug Fixes

  • automatically migrate rest accessories to platform (d82ad32)

2.2.1 (2021-01-29)

2.2.0 (2021-01-29)

Features

  • use mac address as serial number (a7ee3f6), closes #42

2.1.0 (2020-11-14)

Features

  • rest+: alwaysRainbow option (016bcac)

Bug Fixes

  • rest+: handle update requests serially (f08f2b9)
  • only allow rest+ via platform (de0e4f1), closes #32
  • only apply state updates to target device (7635d32), closes #28

2.0.5 (2020-09-13)

2.0.4 (2020-06-05)

2.0.3 (2020-06-02)

Bug Fixes

  • create new mqtt client when auth expires (65d0f33), closes #8

2.0.2 (2020-05-12)

2.0.1 (2020-04-08)

Bug Fixes

  • prevent noble from loading if not used (71deda8), closes #12

2.0.0 (2020-04-05)

⚠ BREAKING CHANGES

  • Node 10+ now required

Features

  • add showAsSwitch option to hbr accessory (0f83328), closes #11

  • update minimum node version to 10 (ea1837e)

1.3.1 (2020-02-29)

Bug Fixes

  • allow rest+ lights to be removed with removeAll (ed0b01e)

1.3.0 (2020-02-27)

Features

1.2.0 (2020-01-06)

Features

  • hatch baby rest+ support (bc808b3), closes #1

1.1.8 (2019-12-18)

Bug Fixes

  • osx: assume correct device if address is unknown (1c892c5), closes #4

1.1.7 (2019-10-05)

Bug Fixes

  • remove initial connect call (412f028)

1.1.6 (2019-10-05)

Bug Fixes

  • revert reconnect logic (27c3c10)
  • throw error when service or characteristic is not found (b50148d)

1.1.5 (2019-09-29)

Bug Fixes

  • add back reconnect logic (a8a2e23)

1.1.4 (2019-09-26)

Bug Fixes

  • only connect while interacting (7d06388)

1.1.3 (2019-09-26)

Bug Fixes

  • strip mac address and service ids for cross platform compatibility (7eefc38)

1.1.2 (2019-09-26)

1.1.1 (2019-09-25)

1.1.0 (2019-09-25)

Features

  • hatch baby rest homebridge plugin (956c56f)