🌅 Node JS client library for Nature Remo Cloud & Local API.
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
docs
examples
src
test
.gitignore
LICENSE
README.md
package.json
tsconfig.json
yarn.lock

README.md

Nature Remo

npm version

npm install nature-remo

Basic Usage

const NatureRemo = require('nature-remo')
const client = new NatureRemo.Cloud(process.env.NATURE_REMO_CLOUD_API_TOKEN)

async function turnOffAirConditioner() {
  const airconList = await client.listAircon()
  const aircon = airconList[0]
  const newAirconSettings = await client.updateAirconSettings(aircon.id, {
    button: 'power-off',
  })
  console.log('Aircon: turned off')
  console.debug(newAirconSettings)
}

async function turnOnAirConditioner() {
  const airconList = await client.listAircon()
  const aircon = airconList[0]
  const newAirconSettings = await client.updateAirconSettings(aircon.id, {
    operation_mode: 'cool',
    temperature: 24,
  })
  console.log('Aircon: turned on')
  console.debug(newAirconSettings)
}

You might want to obtain Nature Remo Cloud API token from https://home.nature.global.

Checkout RunKit Notebook for Nature Remo Cloud API example. See example/ for various code examples.

Also, see API Documents for detailed API documents.

API

const NatureRemo = require('nature-remo')

Cloud API

See Cloud API Documents.

const client = new NatureRemo.Cloud(NATURE_REMO_CLOUD_API_TOKEN)

Local API

See Local API Documents.

const client = new NatureRemo.Local(NATURE_REMO_LOCAL_ADDRESS)

Development

npm install

NATURE_REMO_CLOUD_TOKEN=<nature-remo-cloud-api-token>
NATURE_REMO_AIRCON_ID=<arbitorary aircon id>
npm test