Nothing Particularly Magnificent

    nature-remo
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.0 • Public • Published

    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/uetchy/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!

    Install

    npm i nature-remo

    DownloadsWeekly Downloads

    17

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    17 kB

    Total Files

    5

    Last publish

    Collaborators

    • uetchy