yarn add nature-remo
# or
npm install nature-remo
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.
const NatureRemo = require('nature-remo')
See Cloud API Documents.
const client = new NatureRemo.Cloud(NATURE_REMO_CLOUD_API_TOKEN)
See Local API Documents.
const client = new NatureRemo.Local(NATURE_REMO_LOCAL_ADDRESS)
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
- 🌇 Nature Remo for Rust
Thanks goes to these wonderful people (emoji key):
Yasuaki Uechi 💻 📖 |
Kosuge Kazuya 💻 |
Satoshi Nakamatsu 💻 |
kyo5884 💻 |
This project follows the all-contributors specification. Contributions of any kind welcome!