# node-hivehome

> An (_unofficial_) NodeJS SDK for [Hivehome](https://www.hivehome.com) smarthome products.

Latest version **0.1.0** (published 2021-01-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-hivehome
pnpm add node-hivehome
yarn add node-hivehome
bun add node-hivehome
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2021-01-05 |
| First published | 2021-01-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=14 |
| Dependencies | 6 |
| Unpacked size | 322 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Tom Gallacher |
| Maintainers | tgallacher |

## Links

- npm: https://www.npmjs.com/package/node-hivehome
- npm.io page: https://npm.io/package/node-hivehome

## Dependencies (6)

- [date-fns](https://npm.io/package/date-fns.md) ^2.16.1
- [jwt-decode](https://npm.io/package/jwt-decode.md) ^3.1.2
- [node-fetch](https://npm.io/package/node-fetch.md) ^2.6.1
- [lodash.merge](https://npm.io/package/lodash.merge.md) ^4.6.2
- [query-string](https://npm.io/package/query-string.md) ^6.13.8
- [amazon-user-pool-srp-client](https://npm.io/package/amazon-user-pool-srp-client.md) ^1.0.4

## Recent versions

- 0.1.0 (latest) — 2021-01-05

## README

# node-Hivehome

An (_unofficial_) NodeJS SDK for [Hivehome](https://www.hivehome.com) smarthome products.

> This uses Hivehome's web API, which isn't officially designated for public consumption. Therefore, this may break randomly if the Hivehome team make breaking changes. Nevertheless, we'll try and fix things as fast as possible.

> ⚠️ This is still a WIP, and we're still working to expand the feature support for the range of Hivehome's smarthome platform. Start a [discussion](https://github.com/tgallacher/node-hivehome/discussions) to help me identify which parts should be focused next.

**TOC**

<!-- TOC -->

- [Installation](#installation)
- [Documentation](#documentation)
- [Quick Start](#quick-start)
- [TODO](#todo)
- [Alternative(s)](#alternatives)

<!-- /TOC -->

## Installation

```sh
$ yarn add node-hivehome # or, npm install node-hivehome
```

## Documentation

The documentation can be viewed at [https://tgallacher.github.io/node-hivehome/](https://tgallacher.github.io/node-hivehome/). This is auto-generated from the code, using [typedoc](https://typedoc.org/).

## Quick Start

As a quick example for getting going, with your email and password you can view the heating product(s) and their current state (e.g. temperature) by running the following:

```js
// index.js
const { Hivehome } = require('node-hivehome');

(async ()=>{
  const hive = new Hivehome('hello@example.com');
  // Note: Doesn't support MFA yet. Need to disable in Hivehome's App for first login.
  await hive.auth.login('supersecretpassword');

  const heatingData = await hive.heating.get();

  console.log(JSON.stringify(heatingData, null, 2));
})()
```

Once installed, and with the above script, running:

```sh
node index.js
```

should print out the current state of all Hivehome _heating_ product(s) registered to the account used for logging in.

## TODO

- [ ] Add support for MFA flow
- [ ] Add support for `devices`
- [x] Add support for `heating` products (excl. `trv`s)
- [ ] Add support for `light` products
- [ ] Add support for `camera` products
- [ ] Add support for `sensor` products
- [ ] Add support for `plug` products
- [ ] Add support for `shield` products

## Alternative(s)

- [Pyhive/Pyhiveapi](https://github.com/Pyhive/Pyhiveapi) - Python library interface for Hivehome

---
_Source: https://npm.io/package/node-hivehome · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
