Giter Site home page Giter Site logo

nature-remo-rs's Introduction

Nature Remo

npm version npm: total downloads Build Status Codacy Badge Codacy Badge

yarn add nature-remo
# or
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]

  await client.updateAirconSettings(aircon.id, {
    button: 'power-off',
  })

  console.log('Aircon: turned off')
}

async function turnOnAirConditioner() {
  const airconList = await client.listAircon()
  const aircon = airconList[0]

  await client.updateAirconSettings(aircon.id, {
    operation_mode: 'cool',
    temperature: 24,
  })

  console.log('Aircon: turned on')
}

You might want to grab an API token from https://home.nature.global.

  • RunKit Notebook: Check out RunKit Notebook for runnable code snippets.
  • Code Example: See examples for various code examples.
  • Documents: 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

git clone https://github.com/nature-remo/nature-remo # clone this repository
cd nature-remo # move to the repository folder
yarn install # install deps
NATURE_REMO_CLOUD_TOKEN=<nature-remo-cloud-api-token> yarn test # run test before creating a pull request

Sibling projects

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Yasuaki Uechi

๐Ÿ’ป ๐Ÿ“–

Kosuge Kazuya

๐Ÿ’ป

Satoshi Nakamatsu

๐Ÿ’ป

kyo5884

๐Ÿ’ป

Mitsuteru Asari

๐Ÿ’ป

Chris

๐Ÿ’ป

This project follows the all-contributors specification. Contributions of any kind welcome!

nature-remo-rs's People

Contributors

uetchy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

isgasho

nature-remo-rs's Issues

Question: Is this library supported only aircon?

Hi! I'm a rust beginner, if my understanding is mistake, please let me know.

This library can be got many information.
but, about sending signal, it can be only sent to "aircon".
My understanding is correct?
If correct, I'm going to try updating this library.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.