8slp-node 中文文档教程

发布于 4年前 浏览 21 项目主页 更新于 3年前

8slp-node

[进行中]

八个智能床垫(非官方)- 节点 Api 集成。

没有依赖性。

8slp 需要 Node.js v8+ 才能运行。

灵感来自 Smart Things .

Installation

$ npm install --save 8slp-node

Example

const EightClient = require('8slp-node');
(...)
const eightClient = await EightClient.create('email@foo.com', 'password');
  • presenceEnd(): Both left and right sides have left bed.
  • leftPresenceEnd(): Left side has left bed.
  • rightPresenceEnd(): Right side has left bed.
  • presenceStart(): Both left and right sides are in bed.
  • leftPresenceStart(): Left side is in bed.
  • rightPresenceStart(): Right side is in bed.
  • sleepEnd(): Both left and right sides are awake (might still be in bed).
  • sleepStart(): (TODO) Both left and right sides are sleeping.
  • leftSleepEnd(): Left side is awake.
  • leftSleepStart(): (TODO) Left side is sleeping.
  • rightSleepStart(): (TODO) Right side is sleeping.
  • rightSleepEnd(): Right side is awake.

TODO

  • Set temperature level;
  • Level up;
  • Level down;
  • Get temperature level;
  • Set heat duration;
  • Heating duration down;
  • Heating duration up;
  • Get latest sleep score
  • Monitor temperature
  • Debug mode
  • Is online

8slp-node

[WORK IN PROGRESS]

Eight Smart Matress (Unofficial) - Node Api Integration.

No dependencies.

8slp requires Node.js v8+ to run.

Inspired by Smart Things.

Installation

$ npm install --save 8slp-node

Example

const EightClient = require('8slp-node');
(...)
const eightClient = await EightClient.create('email@foo.com', 'password');
  • presenceEnd(): Both left and right sides have left bed.
  • leftPresenceEnd(): Left side has left bed.
  • rightPresenceEnd(): Right side has left bed.
  • presenceStart(): Both left and right sides are in bed.
  • leftPresenceStart(): Left side is in bed.
  • rightPresenceStart(): Right side is in bed.
  • sleepEnd(): Both left and right sides are awake (might still be in bed).
  • sleepStart(): (TODO) Both left and right sides are sleeping.
  • leftSleepEnd(): Left side is awake.
  • leftSleepStart(): (TODO) Left side is sleeping.
  • rightSleepStart(): (TODO) Right side is sleeping.
  • rightSleepEnd(): Right side is awake.

TODO

  • Set temperature level;
  • Level up;
  • Level down;
  • Get temperature level;
  • Set heat duration;
  • Heating duration down;
  • Heating duration up;
  • Get latest sleep score
  • Monitor temperature
  • Debug mode
  • Is online
    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文